Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
About constants
boriel Wrote:You can see the 'b' variable is useless: You don't use if for anything. If you use -o2 it will be removed.
In your listing you're having the same problem because the compiler does not know anything about the asm level. This problem also exists in other compilers and it's usually fixed with a directive.
You can avoid this by using -o1 compiler option, or just do something like:
REM this code will be optimized and removed
dummy = source
dummy = dest
Which will prevent "source" and "dest" to be removed.

I'm also studying the PRINT library inclusion (this is due to a reorder of the attributes routines for higher speed). Will fix it in 1.1.1.

Yes, its true, I was using -o 2, you arguments are absolutly correct, but I was not expecting that if I use these Variables with ASM, they will be stripped away (they are used ad least in ASM). Maybe this problem could be adressed in one of the future releases. If the variables are used in ASM code, the optimisation must not strip the variables. It will be very useful to have optimisation level 2 together with the possibility to use the variables directly in ASM of a SUB.
The workaround works, thank you.

By the way, I wrote a very positive article about the Compiler for a german fanzine
------------------------------------------------------------ redirector is dead
Visit my home page!

Messages In This Thread

Forum Jump:

Users browsing this thread: 1 Guest(s)