Giter VIP home page Giter VIP logo

Comments (4)

dmcoles avatar dmcoles commented on August 19, 2024 1

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.

dmcoles avatar dmcoles commented on August 19, 2024

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.

dmcoles avatar dmcoles commented on August 19, 2024

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.

SamuraiCrow avatar SamuraiCrow commented on August 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.