Revision history for KeyPgRead


Revision [21104]

Last edited on 2016-03-13 09:41:17 by fxm [Formatting]

No Differences

Revision [20478]

Edited on 2016-02-10 16:07:30 by DkLwikki [Update link format]
Additions:
Reads values stored with the ##[[KeyPgData|Data]]## statement.
Reads data stored in the application with the ##[[KeyPgData|Data]]## command.
All the ##[[KeyPgData|Data]]## statements in the program behave as a single list, after the last element of one ##[[KeyPgData|Data]]## statement is read, the first element of the following ##[[KeyPgData|Data]]## statement will be read.
The program should not attempt to ##[[KeyPgRead|Read]]## after the last ##**Data**## element. The results are (in all dialects) undefined, and the program may crash (Page Fault).
Data constants can only be of simple types (numeric or string). A string read into a numeric variable will be evaluated by the ##[[KeyPgVal|Val]]## function.
The "##[[KeyPgRestore|Restore]] //label//##" statement makes the first ##[[KeyPgData|Data]]## item after ##//label//## the next item to be read, allowing the user to choose specific sections of data to be read.
- See the ##[[KeyPgData|Data]]## page for more information on differences in storing the data
- See the ##[[KeyPgData|Data]]## page for more information on differences in storing the data
- ##[[KeyPgData|Data]]##
- ##[[KeyPgRestore|Restore]]##
Deletions:
Reads values stored with the ##[[KeyPgData Data]]## statement.
Reads data stored in the application with the ##[[KeyPgData Data]]## command.
All the ##[[KeyPgData Data]]## statements in the program behave as a single list, after the last element of one ##[[KeyPgData Data]]## statement is read, the first element of the following ##[[KeyPgData Data]]## statement will be read.
The program should not attempt to ##[[KeyPgRead Read]]## after the last ##**Data**## element. The results are (in all dialects) undefined, and the program may crash (Page Fault).
Data constants can only be of simple types (numeric or string). A string read into a numeric variable will be evaluated by the ##[[KeyPgVal Val]]## function.
The "##[[KeyPgRestore Restore]] //label//##" statement makes the first ##[[KeyPgData Data]]## item after ##//label//## the next item to be read, allowing the user to choose specific sections of data to be read.
- See the ##[[KeyPgData Data]]## page for more information on differences in storing the data
- See the ##[[KeyPgData Data]]## page for more information on differences in storing the data
- ##[[KeyPgData Data]]##
- ##[[KeyPgRestore Restore]]##


Revision [13853]

Edited on 2008-11-01 03:05:48 by DoS386 [2 almost identical examples]
Additions:
DATA 3, 234, 4354, 23433, 87643, "Bye!"
Deletions:
DATA 3, 234, 435/4, 23+433, 87643, "Good" + "Bye!"


Revision [13852]

Edited on 2008-11-01 03:04:21 by DoS386 [minor]
Additions:
The program should not attempt to ##[[KeyPgRead Read]]## after the last ##**Data**## element. The results are (in all dialects) undefined, and the program may crash (Page Fault).
DIM AS INTEGER h(4)
DIM AS STRING hs
DIM AS INTEGER readindex
FOR readindex = 0 TO 4
READ h(readindex)
PRINT "Number" ; readindex ; " = " ; h(readindex)
NEXT readindex
DATA 3, 234, 435/4, 23+433, 87643, "Good" + "Bye!"
- None in syntax and usage of ##**Read**##
- None in syntax and usage of ##**Read**##
Deletions:
The program should not attempt to Read after the last Data element. The results are undefined, and the program may crash.
DIM h(4) AS INTEGER
DIM hs AS STRING
DIM read_data as INTEGER
FOR read_data = 0 TO 4
READ h(read_data)
PRINT "Number"; read_data;" = "; h(read_data)
NEXT
DATA 3, 234, 4354, 23433, 87643, "Bye!"
- None, when ##**Read**##ing data
- None


Revision [13848]

Edited on 2008-10-31 15:52:08 by CountingPine [Clarify some points; remove some DATA-specific info]
Additions:
The elements of the ##//variable_list//## must be of basic types, numeric, strings or elements of arrays and user defined types.
All the ##[[KeyPgData Data]]## statements in the program behave as a single list, after the last element of one ##[[KeyPgData Data]]## statement is read, the first element of the following ##[[KeyPgData Data]]## statement will be read.
The program should not attempt to Read after the last Data element. The results are undefined, and the program may crash.
Data constants can only be of simple types (numeric or string). A string read into a numeric variable will be evaluated by the ##[[KeyPgVal Val]]## function.
The "##[[KeyPgRestore Restore]] //label//##" statement makes the first ##[[KeyPgData Data]]## item after ##//label//## the next item to be read, allowing the user to choose specific sections of data to be read.
- None, when ##**Read**##ing data
- See the ##[[KeyPgData Data]]## page for more information on differences in storing the data
- None
Deletions:
The elements of the ##//variable_list//## must be of basic types, numeric, strings or elements of arrays and user defined types.
All the ##[[KeyPgData Data]]## statements in the program behave as a single list, after the last element of a ##[[KeyPgData Data]]## statement is read, the first element of the following ##[[KeyPgData Data]]## statement will be read. If a ##**Read**## is attempted after the last element of the last data element, an error will occur.
Data constants can only be of simple types (numeric or string). Alphanumeric string constants must be enclosed in quotes.
A numeric value can be read as a numeric literal into a string. A string read into a numeric variable will be evaluated by the ##[[KeyPgVal Val]]## function.
The ##[[KeyPgRestore Restore]]## statement resets the next-element pointer to the start of the ##[[KeyPgData Data]]## following the label. This allows to alter the order in which the data is read.
- The //[[CompilerOptlang -lang fb]]// and //[[CompilerOptlang -lang fblite]]// dialects consider data items as constant expressions that are evaluated during compilation and its result stored in the program.
- The //[[CompilerOptlang -lang qb]]// dialect considers data items as literals and stores then without change, as in QB.
- In FreeBASIC, alphabetic string literals now **must** be enclosed within quotation marks, in QB this was optional.
- In QB, empty constant expressions evaluated to number 0 or to empty strings, in FreeBASIC they give a compile error.


Revision [12910]

The oldest known version of this page was created on 2008-04-13 08:35:24 by JeffMarshall [Clarify some points; remove some DATA-specific info]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki



sf.net phatcode