Next: Shebang, Previous: Commands and Dot-Commands, Up: Commanding poke [Contents][Index]
Script files contain poke commands.
A poke command may be a dot command, a Poke statement or a Poke
expression.
Lines starting with #
are comments will be ignored. However a
comment must start at the beginning of a line. Here is an example
of a script:
# The following two lines are dot commands .load my-pickle.pk .set obase 16 # The following line is a Poke statement dump :size 0x100#B :from 0x10#B # The following line is a Poke expression statement without any side effect. # Consequently it is valid, but rather useless. 4 == 4
A script file contains commands, not Poke code. This means it gets read line by line and commands cannot occupy more than one line. Hence the following is a valid script:
deftype foo = struct {int this; int that;}
but this is not valid as a script file (although it is a valid Poke command) and will provoke an error:
deftype foo = struct { int this; int that; }
Script files can be loaded at startup using the -s
command
line option (see Invoking poke).
The ~/.pokerc startup file is also an example of a poke
script (see pokerc).