Parameters on commands
Parameters are set after the command and are set in a specific order. For example:
PRINT "Hello World! I've parameters too!","heading-args"
The PRINT commands parameters are as follows,
STRING, CLASS, IDNotice how we didn't want to set the ID, just the CLASS for the command.
Output
<span class="heading-args" id="kb-span-46063087656773">Hello World! I've parameters too!</span>
Note: kytschBASIC will automatically add an ID when none is supplied.
Setting HTML parameters on commands
You can pass any parameter you like along with the command but note that only those valid ones to the corresponding HTML tag will be picked up by the browser and used. HTML parameters always come after the command parameters.
Lets use the WINDOW example above and set its class.
PRINT "Hello World! I've parameters too!","heading-args","id-hello-word",onclick="alert('Hello World!')"
HTML specific parameters start with the parameter name, then = and then you set it's value.
Output
<span class="heading-args" id="id-hello-word" onclick="alert('Hello World!')">Hello World! I've parameters too!</span>
It is important that the parameter count matches that of what the command is expecting!For more information on HTML tags and what they do please visit Mdn web docs
or using your favourite search engine look up html tags.
Skipping parameters on commands
PRINT "Hello World! I've parameters too!",,,onclick="alert('Hello World!')"
Here we aren't setting the CLASS or the ID on the PRINT command but notice we must still add the \can add our HTML parameters at the end.
Output
<span id="kb-span-46063087656773" onclick="alert('Hello World!')">Hello World! I've parameters too!</span>