DarwinBotsManual
Open the app EspañolES

*<numero> | *.<sysvar>

An asterisk attached to a number or a sysvar pushes the contents of that memory cell: it's how you read the senses and your own variables.

Facts

Word
*<numero> | *.<sysvar>
Family
Numbers and reads
What it does
Pushes what is in that memory cell. You read a sense the engine writes in the next cycle.
Value
The address of the cell, from 1 to 1000. Outside that range the sign is dropped and the remainder of dividing by 1000 is taken; 0, or a misspelled sysvar, reads 1000.
Cost
Each read is charged the cost *.number read (0 with the F1 rules).
Runs
inside a gene: in the condition (cond) and in the body (start or else)

*50 pushes what's in cell 50; *.nrg pushes what's in the cell of .nrg, that is, the bot's energy. It is the word a bot uses to find out about everything: its senses, its state and what it stored in free memory.

A few things worth knowing:

This bot moves forward only when the central eye (.eye5) sees something:

cond
  *.eye5 0 >
start
  10 .up store
stop

Each read costs *.number read, which under the F1 rules is 0. More in Numbers and addresses and Free and epigenetic memory.