Balid,
Thank for researching/fixing the Help screen problem.
And before reading further, I need to say that I've thought this to death and now even I'm not sure which end is up!
And I'm really not trying to be a pain in the butt!
As far as the colorization, I think there are still some problems. If I'm wrong I apologize and just wasted an entire afternoon when I could have been watching Earth: Final Conflict or something.
I understand what you are saying about global and local - but I'm not sure it's still working correctly. This has caused some minor debugging problems as things that appear global really aren't. Perhaps not a big deal with a small program but more problematic with larger projects?
Please refer to the composite image that shows a sample color scheme (to clarify things), sample code, and the output.
global colors = bluish-green
local colors = red text, light yellow bg
In short:
a) Defined local variables in MAIN are assigned global coloring and font both in main AND functions. Because they appear global in functions, the coder may think they contain values when in fact they are "null".
example:
MAIN
Line 5 - C is defined as string BUT coloreized as global.
C is referenced in MAIN at line 10 and FUNCTION line 34 still colored as global.
FUNCTION
Line 34 - C = 0 (correct) but is colorized as global. So programmer might think you have a string (as defined in Main Line 10 as "this is c$") when in fact it's an Integer in function.
b) If a variable is not declared in a FUNCTION it retains the "default" colorization of black. Perhaps this is correct, however if all non-global variables in a function are "local" why not colorize ALL of them as local.
c) If a variable is defined as being local in a FUNCTION it is assigned global coloring AND if you use the same VARIABLE NAME back in MAIN, it's colorized as a global (even though they are treated correctly as two different variables).
example:
MAIN
Line 17. E is colorized as a global, yet it hasn't been defined or referenced in main (defined in function however). When it prints you get 0, correct ('cuz it's local to main & undefined)
FUNCTION
Line 23: temp is declared as a string, colorized as global not local
Line 25: temp (defined as local in line 23) is still colorized global, not local
Line 28: E is defined as a string, colorized global
Line 29: assignment E = "eee" and still colored global.
Line 36: E prints "eee" and colored global.
plus: although "temp" in my example code is only defined locally in the function (see line 23 above), if I were to use the variable "temp" in main, like "Print temp", "temp" would be colorized global and it would not print a string but rather 0. Again, this would be correct because "temp" hasn't been defined anywhere in main, only in function, still, it's colorized as global.
B$ and D$
As it stands, the output for B$ and D$ (printed in function) are colorized correctly (default) and print as NULL because they are defined in main but undeclared.
Suggestion: If I'm correct in what I've deduced, here's what I'd do if I had the ability to fix & enhance the colorizaton
1) Local Variable - two colorizations. One for variables in main and one for those in functions (defined explicitly or not).
2) Global Variables - fix the way they should work
3) Parameters - Rename current "Local" colorization as "Parameter" colorization. Colorization WITHIN the function for all variables listed in the parameter/argument list (which is actually how it's working now under the moniker of "local variables"
) In addition, if you put a true global variable in a parameter list, then keep it as a global color and not a parameter color.
- ty
(I hope I've got this right because I'm not going to proof-read it any longer!)