Create an HTML table: Difference between revisions

Content added Content deleted
Line 1,017: Line 1,017:
=={{header|Forth}}==
=={{header|Forth}}==
Printing out a group of HTML text strings is not difficult for Forth or most computer languages.
Printing out a group of HTML text strings is not difficult for Forth or most computer languages.
Another way to do this in Forth is to extend Forth with new "Words" that output the HTML tags.
Another way to do this in Forth is to extend Forth with new "words" that output the HTML tags.
These words will then create HTML code when they are interpreted by Forth. In this example the extended Forth code looks at lot like HTML. :-) The biggest difference is that Forth requires 1 space minimum between each tag.
The HTML words will output HTML code when they are interpreted by Forth. In this example the extended Forth code looks at lot like HTML. :-) The biggest difference is that Forth requires 1 space minimum between each tag.<br>
With these extensions we can mix the HTML tags with Forth code to create the required random numbers.
Although this example is not a complete HTML interpreter, with these few extensions we can demonstrate mixing HTML tags with Forth code to generate the specified random numbers in-line with HTML. We could even use Forth to compile tags together and make HTML generating sub-routines like NETREXX does.


<lang Forth>include random.hsf
<lang Forth>include random.hsf