Category : Files from Magazines
Archive   : VOL8N17.ZIP
Filename : FLAGS.BAS

 
Output of file : FLAGS.BAS contained in archive : VOL8N17.ZIP









'********** FLAGS.BAS

DEFINT A-Z
DECLARE SUB ClearAll () 'clears all flags
DECLARE SUB ClearFlag (FlagNum) 'clears a single flag
DECLARE SUB SetFlag (FlagNum) 'sets a single flag
DECLARE FUNCTION GetFlag% (FlagNum) 'retrieves a single flag

CLS
ClearAll 'clear all the flags

FOR X = 1 TO 64 'display each flag to prove they're zero
PRINT GetFlag%(X);
NEXT
PRINT : PRINT

FOR X = 1 TO 64 'set all of the flags
SetFlag X
NEXT

FOR X = 1 TO 64 'display each flag again
PRINT GetFlag%(X);
NEXT
PRINT : PRINT

FOR X = 1 TO 64 STEP 2 'clear every other flag
ClearFlag X
NEXT

FOR X = 1 TO 64 'prove that it worked
PRINT GetFlag%(X);
NEXT






  3 Responses to “Category : Files from Magazines
Archive   : VOL8N17.ZIP
Filename : FLAGS.BAS

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/