23 lines
622 B
Text
23 lines
622 B
Text
Module Checkit {
|
|
function f$(ar) {
|
|
flush
|
|
Data ! ar
|
|
m=stack.size
|
|
document resp$="{"
|
|
if m>2 then {
|
|
shift m-1, 2 ' get last two as first two
|
|
push letter$+" and "+letter$
|
|
m-- ' one less
|
|
shiftback m ' move to last position
|
|
}
|
|
while not empty {
|
|
resp$=letter$+if$(not empty->", ", "")
|
|
}
|
|
=resp$+"}"
|
|
}
|
|
? f$((,))
|
|
? f$(("ABC",))
|
|
? f$(("ABC", "DEF"))
|
|
? f$(("ABC","DEF", "G", "H"))
|
|
}
|
|
Checkit
|