@fxm:
Not sure what you are doing, but for me - both compile without -exx as noted.
@coderjeff:
What is the difference between step 4 and step 6?
END/STOP and destructors
-
- Posts: 606
- Joined: Nov 28, 2012 1:27
- Location: CA, USA moving to WA, USA
- Contact:
Re: END/STOP and destructors
Cases 3 and 4 do not compile at all.speedfixer wrote:Code: Select all
..... ''---------- case 3 ------------- 'dim as string a(5) 'print a(9) ' compile with no -exx: ' screen crash, seg fault ''---------- case 4 ------------- 'dim as string a(5) 'print "AAA" 'print a(9); "XXX" ' compile with no -exx: ' AAA, XXX, ZZZ, DDD, no message .....
(test it if you are not convinced)
With "redim as string a(5)", this would compile.fxm wrote: (the value limits of numeric literals used as static array indexes are always checked at compile phase)
Re: END/STOP and destructors
Yeah, it's almost the same thing; I was attempting to highlight what I think is an important detail in the startup:speedfixer wrote:What is the difference between step 4 and step 6?
4) call fbc MAIN() - this is YOUR (implicit) main function in the main module
This is an actual procedure entry point "main(argc, argv[])" in the linker's namespace like in C. It's the "main" entry point for your program from the perspective of the CRT start up code. If your are running a debugger and set a breakpoint on "main" this is where it stops.
5) call to fb_Init() to finish init of the program
This is automatically added by fbc to the start of your implicit main function before any of your statements. Initialization of fbrt is not quite finished yet: the call to fb_Init() passes argc/argv[] to fbrt so that COMMAND() will work and passes compile-time __FB_LANG__ constant so that rtlib can respect dialect dependent behaviours (I think only RND() function is affected).
6) YOUR PROGRAM HERE
These are the statements written in your main source module. From a simplistic point of view this is where the FreeBASIC program actually starts.