JsonInteger

Family: JSON · 2 forms

What it does

JsonInteger takes jsonValue (an integer), and answers an integer. That is the first of 2 forms.

Syntax

1
JsonInteger(jsonValue integer) → integer
2
JsonInteger(jsonValue integer, value integer)

Parameters

NameTypeIn forms
jsonValueintegerall
valueinteger2

What each form returns

1JsonInteger(1)integer
2JsonInteger(1, 1)nothing

Example · generated

Form 1, the command hands back the id

DO  Print(JsonInteger(1))  Sync()LOOP

Form 2, you choose the id yourself

JsonInteger(1, 1)DO  Sync()LOOP

JsonInteger is called and its answer is printed every frame. The DO … LOOP is not decoration: a classic BASIC program ends the moment it runs out of lines, and Sync() is what draws the frame.

36 commands in JSON