A code segment is enclosed with a begin-code marker <' and an end-code marker '>. Both the begin-code and the end-code markers must be placed at the beginning of a line (left most), with no other text on that same line (no code and no comments). For example, the following three lines of code form a code segment:
EXAMPLE <'
import eth_env; '>
Several code segments can appear in one line. Each code segment consists of one or more statements.
Comments
e ï¬~Ales begin as a comment which ends when the ï¬~Arst begin-code marker <' is encountered.
Comments within code segments can be marked with double dashes (--) or double slashes (//)
The end-code '> and the begin-code <' markers can be used in the middle of code sections, to write several consecutive lines of comment:
<'
import eth_env; '>
This is several consecutive lines of comment
<'
min=46;
-- This is an inline comment
max=1500;
// This is also an inline comment
'>
Literals And Constants
Literals are numeric, character and string values specified literally in e. Operators can be applied to literals to create compound expressions. The following categories of literals and constants are supported in e:
------------------------------------------------------------
Unsized Numbers 12, 55_32, -764
Decimal integer 10, 23_23 .-444
Binary integer 0b100111, 0b1100_0101
Hexadecimal integer 0x99_aa_bb_cc
Octal integer 0o66_123
K (kilo: multiply by 1024) 32K, 32k, 128k
M (mega: multiply by 1024*1024) 1m, 4m, 4M
-------------------------------------------------------------
Sized Numbers
--------------------------------------------------------------
Binary A leading 'b or 'B 8'b11001010
Octal A leading 'o or 'O 6'o45
Decimal A leading 'd or 'D 16'd63453
Hexadecimal A leading 'h or 'H or 'x or 'X 32'h12ffab04
--------------------------------------------------------------
Predeï¬~Aned Constants
---------------------------------------------------------
Constant Description
---------------------------------------------------------
TRUE For Boolean variables and expressions.
FALSE For Boolean variables and expressions.
NULL For structs, specifiles a NULL pointer. For
character strings, specifies an empty string.
UNDEF UNDEF indicates NONE where an index is expected.
MAX_INT Represents the largest 32-bit int (231 -1)
MIN_INT Represents the smallest 32-bit int (-231).
MAX_UINT Represents the largest 32-bit uint (232-1).
--------------------------------------------------------