Compare commits

..
10 Commits
11 changed files with 154 additions and 295 deletions

No files matched your search

+4 -1
View File
@@ -1,4 +1,7 @@
*.o
*~
jet-2.0
docs/JetCore.aux
docs/JetCore.dvi
docs/JetCore.log
docs/JetCore.toc
+98 -9
View File
@@ -9,7 +9,7 @@
namespace jet {
Operand::Operand(coreutils::ZString &in, Tag &tag) {
Operand::Operand(coreutils::ZString &in, Tag &tag, bool stop) : in(in), tag(tag) {
doubleValue = 0;
@@ -64,6 +64,11 @@ namespace jet {
Operand op(parm1.string, tag);
string = op.string;
isNumber = op.isNumber;
if(isNumber) {
doubleValue = op.doubleValue;
string = std::format("{:.12f}", doubleValue);
string.removeTrailingZeros();
}
boolean = op.boolean;
} else
throw coreutils::Exception("Expecting ) at end of EXPR expression.");
@@ -146,9 +151,63 @@ namespace jet {
} else
throw coreutils::Exception("Expecting ) at end of ABS expression.");
} else if(in.ifNextIgnoreCase("MAX")) {
if(!in.ifNext("("))
throw coreutils::Exception("Expecting ( for MAX parameters.");
Operand *parm = new Operand(in, tag);
string = parm->string;
doubleValue = parm->doubleValue;
isNumber = parm->isNumber;
delete parm;
while(in.ifNext(",")) {
parm = new Operand(in, tag);
if(isNumber != parm->isNumber)
throw coreutils::Exception("All parameters in MAX expression must be same type.");
if(isNumber) {
if(parm->doubleValue > doubleValue) {
doubleValue = parm->doubleValue;
string = parm->string;
}
} else {
if(parm->string > string) {
doubleValue = parm->doubleValue;
string = parm->string;
}
}
delete parm;
}
if(!in.ifNext(")")) {
throw coreutils::Exception("Expecting ) at end of MAX expression.");
}
string.removeTrailingZeros();
} else if(in.ifNextIgnoreCase("MIN")) {
if(!in.ifNext("("))
throw coreutils::Exception("Expecting ( for MIN parameters.");
Operand *parm = new Operand(in, tag);
string = parm->string;
doubleValue = parm->doubleValue;
isNumber = parm->isNumber;
delete parm;
while(in.ifNext(",")) {
parm = new Operand(in, tag);
if(isNumber != parm->isNumber)
throw coreutils::Exception("All parameters in MIN expression must be same type.");
if(isNumber) {
if(parm->doubleValue < doubleValue) {
doubleValue = parm->doubleValue;
string = parm->string;
}
} else {
if(parm->string < string) {
doubleValue = parm->doubleValue;
string = parm->string;
}
}
delete parm;
}
if(!in.ifNext(")")) {
throw coreutils::Exception("Expecting ) at end of MIN expression.");
}
string.removeTrailingZeros();
} else if(in.ifNextIgnoreCase("POW")) {
if(!in.ifNext("("))
throw coreutils::Exception("Expecting ( for POW parameters.");
@@ -274,9 +333,27 @@ namespace jet {
} else
throw coreutils::Exception("Expecting ) at end of TRUNC expression.");
} else if(in.ifNextIgnoreCase("CEIL")) {
if(!in.ifNext("("))
throw coreutils::Exception("Expecting ( for CEIL parameters.");
Operand parm1(in, tag);
if(in.ifNext(")")) {
doubleValue = ceil(parm1.doubleValue);
isNumber = true;
string = std::format("{:.12f}", doubleValue);
string.removeTrailingZeros();
} else
throw coreutils::Exception("Expecting ) at end of CEIL expression.");
} else if(in.ifNextIgnoreCase("FLOOR")) {
if(!in.ifNext("("))
throw coreutils::Exception("Expecting ( for FLOOR parameters.");
Operand parm1(in, tag);
if(in.ifNext(")")) {
doubleValue = floor(parm1.doubleValue);
isNumber = true;
string = std::format("{:.12f}", doubleValue);
string.removeTrailingZeros();
} else
throw coreutils::Exception("Expecting ) at end of FLOOR expression.");
} else if(in.ifNextIgnoreCase("UNIXTIME")) {
if(!in.ifNext("("))
throw coreutils::Exception("Expecting ( for UNIXTIME.");
@@ -306,7 +383,15 @@ namespace jet {
throw coreutils::Exception("operand is not valid.");
in.skipWhitespace();
if(!stop)
parseOperator();
return;
}
int Operand::parseOperator() {
if(in.ifNext("!=") || in.ifNext("<>")) {
Operand op(in, tag);
if(isNumber && op.isNumber) {
@@ -451,6 +536,8 @@ namespace jet {
}
}
}
if(in.ifNext("+")) {
if(isNumber) {
Operand op(in, tag);
@@ -475,28 +562,30 @@ namespace jet {
throw coreutils::Exception("operand is not a number.");
} else if(in.ifNext("*")) {
if(isNumber) {
Operand op(in, tag);
Operand op(in, tag, true);
if(op.isNumber) {
doubleValue *= op.doubleValue;
string = std::format("{:.12f}", doubleValue);
string.removeTrailingZeros();
parseOperator();
} else
throw coreutils::Exception("operand is not a number.");
} else
throw coreutils::Exception("operand is not a number.");
} else if(in.ifNext("/")) {
if(isNumber) {
Operand op(in, tag);
Operand op(in, tag, true);
if(op.isNumber) {
doubleValue /= op.doubleValue;
string = std::format("{:.12f}", doubleValue);
string.removeTrailingZeros();
parseOperator();
} else
throw coreutils::Exception("operand is not a number.");
} else
throw coreutils::Exception("operand is not a number.");
} else
return;
}
return true;
}
}
+6 -1
View File
@@ -10,8 +10,11 @@ namespace jet {
class Operand {
public:
Operand(coreutils::ZString &in, Tag &tag);
Operand(coreutils::ZString &in, Tag &tag, bool stop = false);
coreutils::ZString &in;
Tag &tag;
bool isNumber;
///
@@ -23,6 +26,8 @@ namespace jet {
coreutils::MString string = "";
double doubleValue;
int parseOperator();
};
-86
View File
@@ -1,86 +0,0 @@
\relax
\@writefile{toc}{\contentsline {chapter}{\numberline {1}Introduction}{5}{}\protected@file@percent }
\@writefile{lof}{\addvspace {10\p@ }}
\@writefile{lot}{\addvspace {10\p@ }}
\@writefile{toc}{\contentsline {section}{\numberline {1.1}Use Cases}{5}{}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {1.1.1}World Wide Web Site}{5}{}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {1.1.2}API Handling}{5}{}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {1.1.3}Asterisk Dial Plan Generator Tool}{5}{}\protected@file@percent }
\@writefile{toc}{\contentsline {chapter}{\numberline {2}Tags and Attributes}{7}{}\protected@file@percent }
\@writefile{lof}{\addvspace {10\p@ }}
\@writefile{lot}{\addvspace {10\p@ }}
\@writefile{toc}{\contentsline {chapter}{\numberline {3}User Defined Tags and Tag Libraries}{9}{}\protected@file@percent }
\@writefile{lof}{\addvspace {10\p@ }}
\@writefile{lot}{\addvspace {10\p@ }}
\@writefile{toc}{\contentsline {chapter}{\numberline {4}Variables and Variable Types}{11}{}\protected@file@percent }
\@writefile{lof}{\addvspace {10\p@ }}
\@writefile{lot}{\addvspace {10\p@ }}
\@writefile{toc}{\contentsline {section}{\numberline {4.1}Global Variables}{11}{}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {4.2}Local Variables}{12}{}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {4.3}Keyword Variables}{12}{}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {4.4}Environment Variables}{12}{}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {4.5}CGI Variables}{12}{}\protected@file@percent }
\@writefile{toc}{\contentsline {chapter}{\numberline {5}Expressions}{13}{}\protected@file@percent }
\@writefile{lof}{\addvspace {10\p@ }}
\@writefile{lot}{\addvspace {10\p@ }}
\@writefile{toc}{\contentsline {section}{\numberline {5.1}Operators}{13}{}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {5.1.1}Arithmetic Operators}{13}{}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {5.1.2}Boolean Operators}{13}{}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {5.2}Function Reference}{13}{}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {5.3}Date Functions}{13}{}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {5.3.1}unixtime}{13}{}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {5.4}Math Functions}{13}{}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {5.4.1}abs}{13}{}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {5.4.2}acos}{13}{}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {5.4.3}asin}{14}{}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {5.4.4}atan}{14}{}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {5.4.5}cos}{14}{}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {5.4.6}max}{14}{}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {5.4.7}min}{14}{}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {5.4.8}pow}{14}{}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {5.4.9}random}{14}{}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {5.4.10}sin}{14}{}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {5.5}String Functions}{14}{}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {5.5.1}concat}{14}{}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {5.5.2}integer}{14}{}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {5.5.3}left}{14}{}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {5.5.4}reverse}{14}{}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {5.5.5}right}{14}{}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {5.5.6}round}{14}{}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {5.5.7}substring}{14}{}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {5.5.8}tolower}{15}{}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {5.5.9}toupper}{15}{}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {5.5.10}trim}{15}{}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {5.5.11}expr}{15}{}\protected@file@percent }
\@writefile{toc}{\contentsline {chapter}{\numberline {6}Common Gateway Interface Features}{17}{}\protected@file@percent }
\@writefile{lof}{\addvspace {10\p@ }}
\@writefile{lot}{\addvspace {10\p@ }}
\@writefile{toc}{\contentsline {section}{\numberline {6.1}Session Control}{17}{}\protected@file@percent }
\@writefile{toc}{\contentsline {chapter}{\numberline {7}Tag Reference}{19}{}\protected@file@percent }
\@writefile{lof}{\addvspace {10\p@ }}
\@writefile{lot}{\addvspace {10\p@ }}
\@writefile{toc}{\contentsline {section}{\numberline {7.1}call}{19}{}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {7.2}comment}{19}{}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {7.3}cookie}{20}{}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {7.4}dump}{20}{}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {7.5}exclude}{20}{}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {7.6}expr}{20}{}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {7.7}for}{20}{}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {7.8}header}{20}{}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {7.9}if/else}{20}{}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {7.10}ifrow/else}{21}{}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {7.11}include}{21}{}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {7.12}jet}{21}{}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {7.13}mysql}{21}{}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {7.14}read}{21}{}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {7.15}set}{22}{}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {7.16}sql}{22}{}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {7.17}stream}{22}{}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {7.18}system}{22}{}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {7.19}tag}{22}{}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {7.20}until}{23}{}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {7.21}while}{23}{}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {7.22}whiledir}{23}{}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {7.23}whilerow}{23}{}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {7.24}write}{23}{}\protected@file@percent }
\gdef \@abspage@last{23}
BIN
View File
Binary file not shown.
-126
View File
@@ -1,126 +0,0 @@
This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023/Debian) (preloaded format=pdflatex 2024.11.17) 11 NOV 2025 10:01
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**JetCore.tex
(./JetCore.tex
LaTeX2e <2023-11-01> patch level 1
L3 programming layer <2024-01-22>
(/usr/share/texlive/texmf-dist/tex/latex/base/book.cls
Document Class: book 2023/05/17 v1.4n Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/bk10.clo
File: bk10.clo 2023/05/17 v1.4n Standard LaTeX file (size option)
)
\c@part=\count187
\c@chapter=\count188
\c@section=\count189
\c@subsection=\count190
\c@subsubsection=\count191
\c@paragraph=\count192
\c@subparagraph=\count193
\c@figure=\count194
\c@table=\count195
\abovecaptionskip=\skip48
\belowcaptionskip=\skip49
\bibindent=\dimen140
)
(/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def
File: l3backend-pdftex.def 2024-01-04 L3 backend support: PDF output (pdfTeX)
\l__color_backend_stack_int=\count196
\l__pdf_internal_box=\box51
)
(./JetCore.aux)
\openout1 = `JetCore.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 7.
LaTeX Font Info: ... okay on input line 7.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 7.
LaTeX Font Info: ... okay on input line 7.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 7.
LaTeX Font Info: ... okay on input line 7.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 7.
LaTeX Font Info: ... okay on input line 7.
LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 7.
LaTeX Font Info: ... okay on input line 7.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 7.
LaTeX Font Info: ... okay on input line 7.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 7.
LaTeX Font Info: ... okay on input line 7.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <12> on input line 9.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <8> on input line 9.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <6> on input line 9.
[1
{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] [2
]
(./JetCore.toc
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <7> on input line 2.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <5> on input line 2.
[3])
\tf@toc=\write3
\openout3 = `JetCore.toc'.
[4]
Chapter 1.
[5
] [6
]
Chapter 2.
[7] [8
]
Chapter 3.
[9] [10
]
Chapter 4.
[11{/usr/share/texmf/fonts/enc/dvips/cm-super/cm-super-ts1.enc}] [12]
Chapter 5.
[13
] [14] [15] [16
]
Chapter 6.
[17] [18]
Chapter 7.
[19
] [20] [21] [22] [23] (./JetCore.aux)
***********
LaTeX2e <2023-11-01> patch level 1
L3 programming layer <2024-01-22>
***********
)
Here is how much of TeX's memory you used:
508 strings out of 474222
9280 string characters out of 5748732
1936975 words of memory out of 5000000
22826 multiletter control sequences out of 15000+600000
564392 words of font info for 57 fonts, out of 8000000 for 9000
1141 hyphenation exceptions out of 8191
35i,6n,50p,280b,189s stack positions out of 10000i,1000n,20000p,200000b,200000s
</usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx10.pfb></us
r/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb></usr/shar
e/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb></usr/share/texli
ve/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb></usr/share/texlive/texm
f-dist/fonts/type1/public/amsfonts/cm/cmr17.pfb></usr/share/texlive/texmf-dist/
fonts/type1/public/amsfonts/cm/cmsl10.pfb></usr/share/texlive/texmf-dist/fonts/
type1/public/amsfonts/cm/cmtt10.pfb></usr/share/texmf/fonts/type1/public/cm-sup
er/sfrm1000.pfb>
Output written on JetCore.pdf (23 pages, 138298 bytes).
PDF statistics:
119 PDF objects out of 1000 (max. 8388607)
77 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)
+19 -1
View File
@@ -172,6 +172,8 @@ operators, as follows:
\subsection{abs}
Returns the absolute value of the given parameter.
\subsection{acos}
Returns to arc-cosine of the given parameter.
@@ -182,10 +184,20 @@ Returns to arc-cosine of the given parameter.
\subsection{cos}
\subsection{floor}
\subsection{ceil}
\subsection{max}
Returns the greatest value item from a list of comma seperated values in a
list.
\subsection{min}
Returns the least value item from a list of comma seperated values in
a list.
\subsection{pow}
\subsection{random}
@@ -200,7 +212,7 @@ String functions are provided to accelerate the building and parsing of strings
\subsection{concat}
The concat tag is used to assemble a string by concatenating one or more values to formulate the resulting string.
The concat function is used to assemble a string by concatenating one or more values to formulate the resulting string.
@@ -208,6 +220,12 @@ The concat tag is used to assemble a string by concatenating one or more values
\subsection{left}
Use the left function to return the number of characters specified in
the second parameter from the parameter passed as the first parameter.
If the number of characters to return is greater than the length of
the forst parameter then the entire parameter is returned.
\subsection{reverse}
\subsection{right}
-70
View File
@@ -1,70 +0,0 @@
\contentsline {chapter}{\numberline {1}Introduction}{5}{}%
\contentsline {section}{\numberline {1.1}Use Cases}{5}{}%
\contentsline {subsection}{\numberline {1.1.1}World Wide Web Site}{5}{}%
\contentsline {subsection}{\numberline {1.1.2}API Handling}{5}{}%
\contentsline {subsection}{\numberline {1.1.3}Asterisk Dial Plan Generator Tool}{5}{}%
\contentsline {chapter}{\numberline {2}Tags and Attributes}{7}{}%
\contentsline {chapter}{\numberline {3}User Defined Tags and Tag Libraries}{9}{}%
\contentsline {chapter}{\numberline {4}Variables and Variable Types}{11}{}%
\contentsline {section}{\numberline {4.1}Global Variables}{11}{}%
\contentsline {section}{\numberline {4.2}Local Variables}{12}{}%
\contentsline {section}{\numberline {4.3}Keyword Variables}{12}{}%
\contentsline {section}{\numberline {4.4}Environment Variables}{12}{}%
\contentsline {section}{\numberline {4.5}CGI Variables}{12}{}%
\contentsline {chapter}{\numberline {5}Expressions}{13}{}%
\contentsline {section}{\numberline {5.1}Operators}{13}{}%
\contentsline {subsection}{\numberline {5.1.1}Arithmetic Operators}{13}{}%
\contentsline {subsection}{\numberline {5.1.2}Boolean Operators}{13}{}%
\contentsline {section}{\numberline {5.2}Function Reference}{13}{}%
\contentsline {section}{\numberline {5.3}Date Functions}{13}{}%
\contentsline {subsection}{\numberline {5.3.1}unixtime}{13}{}%
\contentsline {section}{\numberline {5.4}Math Functions}{13}{}%
\contentsline {subsection}{\numberline {5.4.1}abs}{13}{}%
\contentsline {subsection}{\numberline {5.4.2}acos}{13}{}%
\contentsline {subsection}{\numberline {5.4.3}asin}{14}{}%
\contentsline {subsection}{\numberline {5.4.4}atan}{14}{}%
\contentsline {subsection}{\numberline {5.4.5}cos}{14}{}%
\contentsline {subsection}{\numberline {5.4.6}max}{14}{}%
\contentsline {subsection}{\numberline {5.4.7}min}{14}{}%
\contentsline {subsection}{\numberline {5.4.8}pow}{14}{}%
\contentsline {subsection}{\numberline {5.4.9}random}{14}{}%
\contentsline {subsection}{\numberline {5.4.10}sin}{14}{}%
\contentsline {section}{\numberline {5.5}String Functions}{14}{}%
\contentsline {subsection}{\numberline {5.5.1}concat}{14}{}%
\contentsline {subsection}{\numberline {5.5.2}integer}{14}{}%
\contentsline {subsection}{\numberline {5.5.3}left}{14}{}%
\contentsline {subsection}{\numberline {5.5.4}reverse}{14}{}%
\contentsline {subsection}{\numberline {5.5.5}right}{14}{}%
\contentsline {subsection}{\numberline {5.5.6}round}{14}{}%
\contentsline {subsection}{\numberline {5.5.7}substring}{14}{}%
\contentsline {subsection}{\numberline {5.5.8}tolower}{15}{}%
\contentsline {subsection}{\numberline {5.5.9}toupper}{15}{}%
\contentsline {subsection}{\numberline {5.5.10}trim}{15}{}%
\contentsline {subsection}{\numberline {5.5.11}expr}{15}{}%
\contentsline {chapter}{\numberline {6}Common Gateway Interface Features}{17}{}%
\contentsline {section}{\numberline {6.1}Session Control}{17}{}%
\contentsline {chapter}{\numberline {7}Tag Reference}{19}{}%
\contentsline {section}{\numberline {7.1}call}{19}{}%
\contentsline {section}{\numberline {7.2}comment}{19}{}%
\contentsline {section}{\numberline {7.3}cookie}{20}{}%
\contentsline {section}{\numberline {7.4}dump}{20}{}%
\contentsline {section}{\numberline {7.5}exclude}{20}{}%
\contentsline {section}{\numberline {7.6}expr}{20}{}%
\contentsline {section}{\numberline {7.7}for}{20}{}%
\contentsline {section}{\numberline {7.8}header}{20}{}%
\contentsline {section}{\numberline {7.9}if/else}{20}{}%
\contentsline {section}{\numberline {7.10}ifrow/else}{21}{}%
\contentsline {section}{\numberline {7.11}include}{21}{}%
\contentsline {section}{\numberline {7.12}jet}{21}{}%
\contentsline {section}{\numberline {7.13}mysql}{21}{}%
\contentsline {section}{\numberline {7.14}read}{21}{}%
\contentsline {section}{\numberline {7.15}set}{22}{}%
\contentsline {section}{\numberline {7.16}sql}{22}{}%
\contentsline {section}{\numberline {7.17}stream}{22}{}%
\contentsline {section}{\numberline {7.18}system}{22}{}%
\contentsline {section}{\numberline {7.19}tag}{22}{}%
\contentsline {section}{\numberline {7.20}until}{23}{}%
\contentsline {section}{\numberline {7.21}while}{23}{}%
\contentsline {section}{\numberline {7.22}whiledir}{23}{}%
\contentsline {section}{\numberline {7.23}whilerow}{23}{}%
\contentsline {section}{\numberline {7.24}write}{23}{}%
+1 -1
View File
@@ -1,6 +1,6 @@
#!../jet-2.0
<jet cgi="true" name1="localname" filterblanklines="true" trimlines="true">
<mysql host="localhost" database="barant" user="barant" password="uversa" sessionid="1">
<mysql host="barant.com" database="barant" user="barant" password="uversa" sessionid="1">
<sql sessionid="1">select * from testdata</sql>
<whilerow name="index" count="10" sessionid="1">
$[1.id] $[1.text] $[1.value]
+13
View File
@@ -12,4 +12,17 @@ $[righty]=56789
$[trim]=this is a test
<set name="integer" expr="integer(12430.54356546)" />
$[integer]=12430
<set name="result" expr="5 + 5 * 5" />
$[result]=30
<set name="result" expr="5 + 5 * 5 + 5" />
$[result]=35
<set name="result" expr="(5 * 2) + (5 * 5) + (5 * 2)" />
$[result]=45
<set name="fivexfive" expr="5 * 5" />
<set name="result" expr="5 * 2 + $[fivexfive] + 5 * 2" />
$[result]=45
<set name="result" expr="2 + 2 * 3 + 2" />
$[result]=10
<set name="result" expr="expr(2 + 2 * 3 + 2)" />
$[result]=10
</jet>
+13
View File
@@ -64,9 +64,22 @@
</for>
<call error="rc" pgm="/usr/bin/ls" arg1="-al" name="ls" />
$[rc]
<set name="max" expr="max(1, 2, 3, 4, 5, 4, 3, 2, 1)" />
max=$[max]
<set name="max" expr="max('A', 'B', 'C', 'D', 'E', 'D', 'C', 'B', 'A')" />
max=$[max]
<set name="min" expr="min(1, 2, 3, 4, 5, 4, 3, 2, 1)" />
min=$[min]
<set name="min" expr="min('A', 'B', 'C', 'D', 'E', 'D', 'C', 'B', 'A')" />
min=$[min]
<set name="list" expr="'A', 'B', 'C', 'D', 'E', 'D', 'C', 'B', 'A'" />
<set name="minlist" expr="min($[list])" />
minlist=$[minlist]
<comment>
$[ls]
<read file="../compile" name="file" />
$[file]
</comment>
<comment>
<whiledir path="/var/www" filename="file" fullpath="fullpath" filenamenoextension="noext" sort="true">
$[file] $[fullpath] $[noext]