mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
* Update test suite: - run test suite with both OG compiler and new compiler - run compiler parity test against testsuite/escript
17 lines
508 B
Text
17 lines
508 B
Text
use math;
|
|
|
|
// This isn't supposed to compile, but it does. It works because the emitted
|
|
// code to call a module function (with 0 parameters) is a single instruction.
|
|
//
|
|
// This is more commonly seen in NPC control scripts, which often do
|
|
// something like this:
|
|
// const me := self();
|
|
//
|
|
// The intent is likely brevity and efficiency, but this will result in
|
|
// repeated calls to the module function, rather than storage and reuse
|
|
// of the result of a single call.
|
|
|
|
const PI := ConstPI();
|
|
|
|
print( PI );
|
|
|