Forums

Find answers, ask questions, and connect with our
community all around the world.

Home Forum Omnis General Forum DEBUG constants

  • Klaus Schrödl

    Administrator
    October 16, 2019 at 11:10 am

    Hi Gigi,
    #DEBUG in VS and debugging in Omnis are two different issues, that cannot be compared directly.
    Major difference is, that in VS an EXE or DLL is being compiled in Debug or Release mode.
    Since Omnis isn’t compiler based, there is no difference between libraries.
    But, and maybe this helps, you can determine by code, if your code/library is running inside a runtime or inside the development IDE.
    The function you can use for that is
    sys(2)
    From the documentation:
    returns the Omnis program type byte:
    bit 0 = full program/IDE (value 1),
    bit 1 = runtime (value 2),
    bit 2 = evaluation (value 4),
    bit 3 = integrated (value 8),
    bit 4 = Unicode (value 16). Always set.
    Note that the current version of Omnis does not support the use of integrated versions.
    So in the runtime, sys(2) will return 18 (bit 1 and 4 set, since I guess you’re working with Omnis 8 or 10 which are only availabe as Unicode version)
    The IDE will return 17 (bit 1 and 4 set)
    Hope that helps

  • gigi soave

    Member
    October 17, 2019 at 11:13 am

    Thank you Klaus,
    Reference to VS #DEBUG was in order to clear better my question with a well known example, of course, the two ide cannot be compare directly.
    Your answer is exactly what I looking for.
    Luigi

  • Klaus Schrödl

    Administrator
    October 17, 2019 at 11:58 am

    Hi Gigi,
    you’re welcome 🙂

Log in to reply.