02-13-2009, 06:10 PM
Defining constants with CONST Constant as UByte=0 is not the ideal way, because they can be easy mistaken for variables, and can interfer with variables. So my proposal is to change it to similar way, PureBasic does:
#Constant as UByte=0, and all constants are marked with "#" sign in the front. In PureBasic it is a little different, as the constant and variable types are defined this way: #constant.ub=0 (ub=short for unsigned byte, has to be defined only one time).
apart from this I propose to include build-in constants with ROM Labels and System variables:
#KSTATE=23552, #LASTK=23560, #REPDEL=23561, #REPPER=23562, ...
#start=$0, #error_1=$8, #print_a_1=$10, #get_char=$18
#test_char=$1C, #next_char=$20, #fp_calc=$28, #bc_spaces=$30, ...
Also constants for some other usages:
#False=0, #True=1, #Zero=0
#Black=0, #Blue=1, #Red=2, #Magenta=3,...
Is this a good idea???
#Constant as UByte=0, and all constants are marked with "#" sign in the front. In PureBasic it is a little different, as the constant and variable types are defined this way: #constant.ub=0 (ub=short for unsigned byte, has to be defined only one time).
apart from this I propose to include build-in constants with ROM Labels and System variables:
#KSTATE=23552, #LASTK=23560, #REPDEL=23561, #REPPER=23562, ...
#start=$0, #error_1=$8, #print_a_1=$10, #get_char=$18
#test_char=$1C, #next_char=$20, #fp_calc=$28, #bc_spaces=$30, ...
Also constants for some other usages:
#False=0, #True=1, #Zero=0
#Black=0, #Blue=1, #Red=2, #Magenta=3,...
Is this a good idea???
------------------------------------------------------------
http://lcd-one.da.ru redirector is dead
Visit my http://members.inode.at/838331/index.html home page!
http://lcd-one.da.ru redirector is dead
Visit my http://members.inode.at/838331/index.html home page!