330
V. N. Lukin and L. N. Chernyshov
mtemp = [
" Write HTML-code with the functions on the JavaScript. ",
"A display form has buttons (%pos%)and a selection item (%pos%).",
"%typ1% is selected and %typ2% is written to the selection item.",
"By result button %typ3%."
]
mpos = ["on the top upper right corner", "on the lower right corner "]
mtyp = [
["cinema", " movie list and session price", " is the movie with the
lowest ticket price"],["theater", " list of performances and date", "
there is a performance with the earliest date"]
function getRandomInt(min, max){ // random number in the range [min,max]
… }
function get(m){ // accidental value from m … }
function mix(m){ // mix m … }
f2 = fso.CreateTextFile(fout) // to create the output file
for (j=0; j for (ks=0; ks s = mtemp[ks] // 1
ms = s.split("%") // text % code % text % code % text …
k = ms.length
if (k>1){ // есть %kod%
i0 = 0
for (var i=1; i if (ms[i]=='k')
ms[i]='2'
else if (ms[i]=='pos'){
if (i0==0) m1 = mix(mpos) // mix
ms[i]= m1[i0];
i0++
}else if (ms[i]=='typ1'){ //
k1 = mtyp.length
k2 = getRandomInt(0, k1-1)
ms[i]
= mtyp[k2][0]
ms[i+2] = mtyp[k2][1]
ms[i+4] = mtyp[k2][2]
}else if
(ms[i]=='out'){
// . . .
}
}
ss = ""; for(i=0;i } else ss =s
f2.WriteLine(ss)
}
f2.WriteLine("")
}
f2.Close()
Fig. 22.4 Pseudo-code of program written on the JavaScript
Fig. 22.5 Print screen of Google-table “Table of a single group”
Précédent

- 328/374

Suivant