More effective binder
I looked on a win32lib prog created by "shroud -clear"
and nearly all files have the colours at the top:...
global integer
BLUE,CYAN,RED,BROWN,BRIGHT_BLUE,BRIGHT_CYAN,BRIGHT_RED,YELLOW
constant WIN32=2
,LINUX=3
even that the colours isn't used in my program.
After looking below, this is the cause:
if platform()=LINUX then
BLUE=4
CYAN=6
RED=1
BROWN=3
BRIGHT_BLUE=12
BRIGHT_CYAN=14
BRIGHT_RED=9
YELLOW=11
else
BLUE=1
CYAN=3
RED=4
BROWN=6
BRIGHT_BLUE=9
BRIGHT_CYAN=11
BRIGHT_RED=12
YELLOW=14
end if
So I have a suggestion:
- Variables that is used but only for assignment can be discarded:
e.g.
x = 1
y = 12 + (35*20)
z = y+1 (when y and z is not used, but this may need 3-pass
binder)
e.g.
setText(x, ..) (cannot discard x because it is not an
assignment)
and don't discard variables that use user defined types.
Thank you.
|
Not Categorized, Please Help
|
|