185 BPUT# put a byte to file Purpose To store a byte on cassette or disc. See chapter 31 for a more detailed description of file handling. The number which is sent to the file can have any value between 0 and 255. If you attempt to store a number that is greater than 255, then 256 will be repeatedly subtracted from the number until it is less than 256. The final number will then be sent to file. (This statement is used to store single bytes – not large numbers. Larger numbers can be stored using PRINT# .) As with BGET# the file must be ‘open’ before this statement can be used.
Examples 30 BPUT# channel,number 700 BPUT#N,32 450 BPUT# STAFF_FILE, A/256 A statement which puts a byte to the file whose channel number is the first argument. The second argument’s least significant byte is sent. The file must be open before this statement is executed. Description Syntax BPUT# , OPENIN , OPENUP , OPENOUT , CLOSE# , EXT# , PTR# , PRINT# , INPUT# , BGET# , EOF# Associated keywords