<numero>
A number written in the DNA, or the name of a sysvar without an asterisk, is pushed as is onto the integer stack.
Facts
- Word
<numero>- Family
- Numbers and reads
- What it does
- Pushes the number as is onto the integer stack. The name of a sysvar without an asterisk pushes its address.
- Value
- The number as written, from −32768 to 32767; outside that range the bot does not load. A decimal is rounded to the nearest integer (to the even one on a tie).
- Cost
- Each number is charged the cost Number (0 with the F1 rules).
- Runs
- inside a gene: in the condition (cond) and in the body (start or else)
A bare number in the DNA does nothing except get pushed. It's how you give the operators their data: in 10 3 sub, the 10 and the 3 are numbers and sub uses them.
Besides digits, these also count as a number:
- The name of a sysvar without an asterisk.
.upis exactly the same as1: it pushes the address of.up, not its contents. That's why it's used to say where astorewrites. - A variable from Variables with def.
def presa 50makes.presabe 50. - Any word that isn't recognized. It's not an error: it counts as 0 (see Common mistakes).
Rules for the literal:
- It has to be between −32768 and 32767. Outside that range, the whole bot fails to load. A bigger number is built with operators:
200 200 mult. - Negatives are written with the sign attached:
-5. - A decimal is rounded to the nearest integer, and on an exact tie to the even one:
1.5and2.5are both 2.
cond
start
' stack: 5 then: 5 1 store writes 5 to cell 1 (.up)
5 .up store
stopThis bot pushes forward with 5 every cycle. Each number costs Number, which under the F1 rules is 0. More in Numbers and addresses.