Functions |
HEXS
The HEX$(X) function returns a string of hexadecimal digits which represents the hexadecimal value of the integer argument. In
HEX$ (expression)
PRINT HEX$
Returns:
FFFF FFFF
HEX$ (expression)
10 PRINT "TYPE THE NUMBER OF BYTES OF SPACE"
20PRINT "NEEDED FOR YOUR PROGRAM, IN DECIMAL:"
30PRINT
40INPUT A
50A$ = HEX$(A)
60PRINT "YOU'LLNEED "; A$; "BYTES"
INP
The INP function returns the value of a byte from the input port specified by the expression. The expression must be an integer expression in the range
INP (expression)
50IF INP(A) = 12 THEN PRINT "FORM FEED"
60IF INP(A) = 7 THEN PRINT "BELL"
INPUTS
The INPUT$ function reads to a specified number of characters from a specified se- quential file. In the example below you can type in any ten or more characters from the console into sequential file #2. The :CI: specifies console input. Line 20 prints the first 10 characters of file #2, and CLOSE concludes the reading of the data. INPUT$ treats Carriage Return like any other character.
INPUT$ (characters, filenumber)
10OPEN "1", #2, ":CI:"
20PRINT IN PUT$ (10,2)
30CLOSE#2
40END
RUN
1234567890 (CR)
1234567890