Open jakebullet70 opened 2 months ago
Would like to see a CONST directive.
Something like this... (this is just off of the top of my head)
DIM PRT2SCRN.ATTR$(4) REM STR2PRINT$ IS THE STRING TO PRINT
REM --- PRT2SCRN.ATTR$(#X.LOCATION) = 10 PRT2SCRN.ATTR$(#Y.LOCATION) = 2 STR2PRINT$ = "TEST STRING 2 PRINT" GOSUB PRINT.AT
REM --- PRT2SCRN.ATTR$(#X.LOCATION) = 5 : PRT2SCRN.ATTR$(#Y.LOCATION) = 5 PRT2SCRN.ATTR$(#FG.COLOR) = 2 : PRT2SCRN.ATTR$(#BG.COLOR) = 0 STR2PRINT$ = "TEST STRING 2 PRINT WITH COLOR" GOSUB PRINT.AT
END
REM --------------------------------------------------------------------------
PRINT.AT.CLR: LOCATE PRT2SCRN.ATTR$(#X.LOCATION),PRT2SCRN.ATTR$(#Y.LOCATION) COLOR PRT2SCRN.ATTR$(#FG.COLOR),PRT2SCRN.ATTR$(#BG.COLOR) PRINT STR2PRINT$ RETURN
PRINT.AT: LOCATE PRT2SCRN.ATTR$(#X.LOCATION),PRT2SCRN.ATTR$(#Y.LOCATION) PRINT STR2PRINT$ RETURN
Here is some code I am working on to create a scrollible menu. This is why I thought of CONST
Would like to see a CONST directive.
Something like this... (this is just off of the top of my head)
CONST X.LOCATION = 1
CONST Y.LOCATION = 2
CONST FG.COLOR = 3
CONST BG.COLOR = 4
DIM PRT2SCRN.ATTR$(4)
REM STR2PRINT$ IS THE STRING TO PRINT
REM --- PRT2SCRN.ATTR$(#X.LOCATION) = 10 PRT2SCRN.ATTR$(#Y.LOCATION) = 2 STR2PRINT$ = "TEST STRING 2 PRINT" GOSUB PRINT.AT
REM --- PRT2SCRN.ATTR$(#X.LOCATION) = 5 : PRT2SCRN.ATTR$(#Y.LOCATION) = 5 PRT2SCRN.ATTR$(#FG.COLOR) = 2 : PRT2SCRN.ATTR$(#BG.COLOR) = 0 STR2PRINT$ = "TEST STRING 2 PRINT WITH COLOR" GOSUB PRINT.AT
END
REM --------------------------------------------------------------------------
PRINT.AT.CLR: LOCATE PRT2SCRN.ATTR$(#X.LOCATION),PRT2SCRN.ATTR$(#Y.LOCATION) COLOR PRT2SCRN.ATTR$(#FG.COLOR),PRT2SCRN.ATTR$(#BG.COLOR) PRINT STR2PRINT$ RETURN
PRINT.AT: LOCATE PRT2SCRN.ATTR$(#X.LOCATION),PRT2SCRN.ATTR$(#Y.LOCATION) PRINT STR2PRINT$ RETURN