mirror of
https://github.com/irmen/prog8.git
synced 2025-02-16 22:30:46 +00:00
doc
This commit is contained in:
parent
204f5591a9
commit
be64fa674a
@ -6,10 +6,10 @@ package prog8.buildversion
|
||||
const val MAVEN_GROUP = "prog8"
|
||||
const val MAVEN_NAME = "compiler"
|
||||
const val VERSION = "9.1-SNAPSHOT"
|
||||
const val GIT_REVISION = 3922
|
||||
const val GIT_SHA = "UNKNOWN"
|
||||
const val GIT_DATE = "2023-07-02T21:41:15Z"
|
||||
const val GIT_REVISION = 3924
|
||||
const val GIT_SHA = "204f5591a91d51bc514d4c753907559da0ffa61b"
|
||||
const val GIT_DATE = "2023-07-03T19:57:32Z"
|
||||
const val GIT_BRANCH = "master"
|
||||
const val BUILD_DATE = "2023-07-02T21:41:41Z"
|
||||
const val BUILD_UNIX_TIME = 1688334101117L
|
||||
const val DIRTY = 1
|
||||
const val BUILD_DATE = "2023-07-03T19:57:42Z"
|
||||
const val BUILD_UNIX_TIME = 1688414262709L
|
||||
const val DIRTY = 0
|
||||
|
@ -353,6 +353,7 @@ value is given, the array size in the declaration can be omitted.
|
||||
**binary numbers:** you can use a percent prefix to write binary numbers: ``%10010011``
|
||||
Note that ``%`` is also the remainder operator so be careful: if you want to take the remainder
|
||||
of something with an operand starting with 1 or 0, you'll have to add a space in between.
|
||||
Otherwise the parser thinks you've typed an invalid binary number.
|
||||
|
||||
**character values:** you can use a single character in quotes like this ``'a'`` for the PETSCII byte value of that character.
|
||||
|
||||
@ -483,8 +484,9 @@ Operators
|
||||
arithmetic: ``+`` ``-`` ``*`` ``/`` ``%``
|
||||
``+``, ``-``, ``*``, ``/`` are the familiar arithmetic operations.
|
||||
``/`` is division (will result in integer division when using on integer operands, and a floating point division when at least one of the operands is a float)
|
||||
``%`` is the remainder operator: ``25 % 7`` is 4. Be careful: without a space, %10 will be parsed as the binary number 2.
|
||||
Remainder is only supported on integer operands (not floats).
|
||||
``%`` is the remainder operator: ``25 % 7`` is 4. Be careful: without a space after the %, it will be parsed as a binary number.
|
||||
So ``25 %10`` will be parsed as the number 25 followed by the binary number 2, which is a syntax error.
|
||||
Note that remainder is only supported on integer operands (not floats).
|
||||
|
||||
bitwise arithmetic: ``&`` ``|`` ``^`` ``~`` ``<<`` ``>>``
|
||||
``&`` is bitwise and, ``|`` is bitwise or, ``^`` is bitwise xor, ``~`` is bitwise invert (this one is an unary operator)
|
||||
|
Loading…
x
Reference in New Issue
Block a user