379 and PRINT ~!M (print in hex, shriek M) would give 12345678 Four bytes are used to store integers so the shriek operator can be used to manipulate integer variables. The last operator in this group is the string indirection operator called dollar. Do not confuse with as they are quite different. is the usual string variable. On the other hand can be used to read or write a string to memory starting at memory location M . Remembering that we have set M = &2000 then $M="ABCDEF" will place the string ABCDEF and a carriage return (&0D) in memory from location &2000 on. Similarly PRINT $M will print And one last twist to the use of these operators.
We have seen how query, shriek and dollar can be used as unary operators – that is with only one operand. We have used M as the operand in the example above – for example ABCDEF M=&2000 ?M=&45 Y=?M PRINT ?M !M=&8A124603 Y=!M PRINT!M $M="HELLO ZAPHOD" PRINT $M but in addition both query and shriek can be used as binary operators provided that the left hand operand is a variable (such as M9 ) and not a constant. Thus M?3 means the contents of (memory location M plus 3) – in other words of location &2003. There is a simple routine to examine the contents of memory for 12 bytes beyond &2000. 10 FOR X=0 TO 12 20 PRINT ~M+X, ~M?X 30 NEXT