1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-26 06:15:52 +00:00
QB64-PE/internal/help/VARSEG.txt
SMcNeill 6e01fc8dce Altered string compare routines (<,<=,>,>=) so they don't give false results with CHR$(0).
Added new _STRCMP and _STRICMP commands for quick string comparisons.
Cleaned up QB64 to finish removing the QUI (quick user insert) code and folders.
Altered UCASE and LCASE routines to be faster in some situations for us.
2014-09-22 08:19:03 -04:00

25 lines
1.2 KiB
Plaintext

The '''VARSEG''' function returns an [[INTEGER]] value that is the segment part of a variable or array memory address.
{{PageSyntax}}
:: [[DEF SEG]] = VARSEG(variable_name[(start_index)])
* If variablename is not defined before [[VARPTR]] or VARSEG is called, the variable is created and its address is returned.
* The start index is the lowest index of an array variable when used.
* When a string variable, VARSEG returns the segment location address of the first byte of the string.
* Because many Qbasic statements change the locations of variables in memory, use the values returned by VARPTR and VARSEG immediately after the functions are used!
* Integer array sizes are limited to 32767 elements when using [[VARSEG]] in QB and '''QB64'''!. Create a larger array using [[_BYTE]]. Example: [[DIM]] [[SHARED]] Memory (65535) AS [[_UNSIGNED]] [[_BYTE]]
* '''Warning: DEF SEG, VARSEG , VARPTR, PEEK or POKE access QB64's emulated 16 bit conventional memory block!'''
: '''It is highly recommended that QB64's [[_MEM]] memory system be used to avoid running out of memory.'''
''See also:''
* [[BSAVE]], [[BLOAD]]
* [[SADD]], [[DEF SEG]]
* [[VARPTR]], [[VARPTR$]]
* [[POKE]], [[PEEK]]
{{PageNavigation}}