Comments (4)
MODE_NEWFILE is fine if you include the relevant dos module but e-vo also has NEWFILE constant defined by default. So either is fine but it seemed sensible to use the built in one in this case which saves the need to add the extra module which wouldn't even be needed when debug isn't set.
from evo.
fixed in latest commit. the issue was with the #else parsing
I can send you an updated exe or you can build it yourself from the source.
from evo.
also your code has a couple of syntax issues.. here is the corrected version
-> Globals are prefixed with g_ and defined here
DEF g_idcmp, g_scrn, g_wndw
#ifdef DEBUG
DEF g_log
PROC trace(msg,var=NIL)
IF var
VfPrintf(g_log,msg,var)
ELSE
Fputs(g_log,msg)
ENDIF
Flush(g_log)
ENDPROC
#else
PROC trace(msg,var=NIL) IS 0
#endif
PROC main()
#ifdef DEBUG
g_log:=Open('file.log',NEWFILE)
#endif
trace('hello log!\n')
#ifdef DEBUG
Close(g_log)
#endif
ENDPROC
from evo.
I created a workaround in my actual source that put the #ifdef DEBUG
inside the body of the trace() function and #endif
just before the ENDPROC
so the #else
was no longer needed. If it works with your modified snippet above, I trust you fixed it just fine. Thanks for the tip on the MODE_NEWFILE
flag being wrong, I was using C based autodocs.
from evo.
Related Issues (11)
- Missing Bin/Doc Folder HOT 2
- Misaligned writes in ac structure in graphics/gels.e HOT 3
- Optimizing for lower calling overhead HOT 1
- Case sensitivity in double precision module HOT 7
- Missing tutorial in guide HOT 2
- CLR opcode workaround HOT 5
- Module won't always load HOT 2
- Different assigns for debug modules HOT 2
- What would it take to create a REPL? HOT 2
- Why does this work? HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from evo.