JTP concept

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

JTP concept

fschmidt
Administrator
Instead of a new string literal, I decided to do something closer to the JTP idea.  I will have a new statement called an Output Statement that looks like this:
%>1 + 1 = <%=1+1%><%
This can have multiple lines in it, so this also works:
%>
1 + 1 = <%=1+1%>
1 + 2 = <%=1+2%>
<%
Since this is nothing more than a statement, it can be freely mixed with other statement.  The difference from JTP is that there is no initial <% or ending %>.  But like JTP, this send output to standard out, to the same place that print() sends output.
Woe to those who call bad good and good bad -- Isaiah 5:20
Following the Old Testament, not evil modern culture
Reply | Threaded
Open this post in threaded view
|

Re: JTP concept

fschmidt
Administrator
done in rev 55
Woe to those who call bad good and good bad -- Isaiah 5:20
Following the Old Testament, not evil modern culture
Reply | Threaded
Open this post in threaded view
|

Re: JTP concept

Hugo <Nabble>
It looks good.
Reply | Threaded
Open this post in threaded view
|

Re: JTP concept

fschmidt
Administrator
closing thread
Woe to those who call bad good and good bad -- Isaiah 5:20
Following the Old Testament, not evil modern culture
Reply | Threaded
Open this post in threaded view
|

Re: JTP concept

fschmidt
Administrator
This post was updated on .
In reply to this post by fschmidt
I changed my mind about how this should work.  Rather than an Output Statement, I want this syntax to be a table constructor that constructs a list.  This list can be output or whatever.  So if there is an "output" command, the examples become:
output %>1 + 1 = <%=1+1%><%
and
output %>
1 + 1 = <%=1+1%>
1 + 2 = <%=1+2%>
<%
Woe to those who call bad good and good bad -- Isaiah 5:20
Following the Old Testament, not evil modern culture
Reply | Threaded
Open this post in threaded view
|

Re: JTP concept

fschmidt
Administrator
The idea of a table constructor doesn't work because an expression may return nil which would leave a hole in the list.  Instead I will treat this syntax as varargs for a function call.
Woe to those who call bad good and good bad -- Isaiah 5:20
Following the Old Testament, not evil modern culture
Reply | Threaded
Open this post in threaded view
|

Re: JTP concept

fschmidt
Administrator
I generalized this to be an expression that returns multiple results in rev 108.  closing thread.
Woe to those who call bad good and good bad -- Isaiah 5:20
Following the Old Testament, not evil modern culture