HP 1.6 BASIC software User Manual
PDF
Dokument
Reklaam
Reklaam
In the following example, because both INPUT LINE and LINPUT treat your input as a string literal, BASIC interprets quotation marks, commas, and semicolons as characters, not as string delimiters. When A$ is input with the INPUT LINE statement, the carriage return line terminator is stored as part of the string. The first PRINT statement tells BASIC to print all three variables on one line, starting each one in a new print zone. However, when BASIC prints the three strings, it prints the carriage return character at the end of string A$; this terminates the current line and causes B$ to begin on a new line. INPUT LINE A$ LINPUT B$ LINPUT C$ PRINT A$, B$, C$ PRINT "DONE" END Output ? SINGLE, DOUBLE Return ? "GFLOAT" Return ? HFLOAT; REAL Data Types Return SINGLE, DOUBLE "GFLOAT" HFLOAT; REAL Data Types DONE The INPUT, INPUT LINE, and LINPUT statements can accept data from a terminal or a terminal-format file. See Section 5.3 for information about I/O to terminal-format files. 5.1.1.3 Enabling and Disabling the Question Mark Prompt With the SET PROMPT statement, HP BASIC allows you to enable and disable the question mark prompt. By default, HP BASIC displays the question mark prompt. The following example displays the default prompt string: INPUT "Please input 3 integer values";A%, B%, C% Output Please input 3 integer values? You can, however, disable the question mark prompt by specifying the SET NO PROMPT statement. SET NO PROMPT INPUT "Please input 3 integer values";A%, B%, C% 5â4 Simple Input and Output ">
/
Laadi alla
Lihtsalt sõbralik meeldetuletus. Saate dokumenti vaadata otse siin. Kuid mis kõige tähtsam, meie AI on selle juba läbi lugenud. See suudab keerulisi asju lihtsate terminitega selgitada, teie küsimustele vastata mis tahes keeles ja aidata teil kiiresti navigeerida isegi kõige pikemates või keerulisemates dokumentides.
Reklaam