HTPL Compiler
  • HTPL Compiler
  • Introduction
  • Github repository
  • What is HTPL and why it exists
  • Getting started
  • Syntax
    • Variable declaration
    • Returning values
    • Operations between values
    • Value assignment
    • If then else branches
    • Comparison and logical operators
    • Function declaration and invocation
    • While loop
    • Inputs and outputs
    • Comments
  • Other
    • HTPLCompiler interface - Browser
    • Error handling
Powered by GitBook
On this page

Was this helpful?

  1. Syntax

While loop

This is the only available loop in HTPL. It's defined by <while> element (so much fantasy). At least two children are required, the first for the condition and the second (and others) for the code to loop:

<while>
    <strong id=">">
        <p id="numberOfLoops"></p>
        <p id="0"></p>
    </strong>
    <h2 id="numberOfLoops">
        <b id="-">
            <p id="numberOfLoops"></p>
            <p id="1"></p>
        </b>
    </h2>
</while>

this code is compiled as:

while(numberOfLoops > 0){
    numberOfLoops = numberOfLoops - 1;
}
PreviousFunction declaration and invocationNextInputs and outputs

Last updated 4 years ago

Was this helpful?