Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
readstat - read one statement from the input stream
Calling Sequence
readstat()
readstat(prompt)
readstat(ditto3, ditto2, ditto1)
readstat(prompt, ditto3, ditto2, ditto1)
Parameters
prompt
-
string to be used as a prompt
ditto3
value to be used for %%%
ditto2
value to be used for %%
ditto1
value to be used for %
Description
The function readstat reads the next statement from the input stream (the terminal or a file) and returns the value of that statement.
If a prompt is specified, it will be displayed.
If the ditto3, ditto2, and ditto1 arguments are given, they must be lists, and the values of their contents will be substituted for any occurrences of %%%, %%, and % respectively in the statement read.
If an incomplete statement is entered, readstat will redisplay the prompt to allow further input. This will continue until a complete statement is entered.
If a syntax error is discovered, readstat will produce a syntax error message, and redisplay the prompt, expecting a new statement.
The readstat function always reads as many entire lines as needed to parse a complete statement. If the last line contains additional characters after the end of the complete statement, a warning is generated, and the remaining input is discarded. Therefore, multiple statements per line are not permitted.
Some Examples
x := readstat("x will be assigned ");
readstat("Something: ",[A],[B],[C]);
readstat("Hello? ");
See Also
history, parse, read, readline, scanf, showtime
Download Help Document