Topic : The GFA-Basic Compendium Author : GFA Systemtechnik GmbH Version : GFABasic.HYP v2.98 (12/31/2023) Subject : Documentation/Programming Nodes : 899 Index Size : 28056 HCP-Version : 3 Compiled on : Atari @charset : atarist @lang : @default : Document not found @help : Help @options : +g -i -s +z @width : 75 @hostname : STRNGSRV @hostname : CAB @hostname : HIGHWIRE @hostname : THING View Ref-FileBYTE(x) CARD(x) WORD(x) x: iexp BYTE() returns the lower 8 bits of the numerical expression x. The functions CARD() returns the lower 16 bits of the numerical expression x. The function WORD() extends a word to long word length (32 bits) by copying bit 15 to bit positions 16 to 31, thus preserving the sign. Examples: PRINT BYTE(255),BYTE(1+255) PRINT HEX$(CARD(&H1234ABCD)) --> 255, 0, and ABCD are printed. x%=&HFFFF PRINT BIN$(x%,32) x%=WORD(x%) PRINT BIN$(x%,32) --> The screen displays: 00000000000000001111111111111111 11111111111111111111111111111111