# version

Definition: | sequence ver = version()
Description: | version() is a function built-in to the interpreter. It indicates the version of the Phix interpreter/compiler used, as per constant phixverstr in pglobals.e, eg "0.8.2".
pwa/p2js: | Supported.
Comments: | The call to verison() costs nothing. It is optimized at compile-time directly into a string literal. The requires() routine should be used to ensure code is being run on a suitably up-to-date interpreter.
Example: |
    ?version()                                          -- displays eg "0.8.2"
    printf(1,"Version %s\n",{version()})                -- displays eg Version 0.8.2
    ?scanf(substitute(version(),"."," "),"%d %d %d")    -- displays eg {{0,8,2}}
Implementation: | Optimised away by the compiler - search for Z_version in pmain.e for more details.
See Also: | platform, printf, scanf, substitute, requires