Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
36
Task/Amb/OpenEdge-Progress/amb.openedge
Normal file
36
Task/Amb/OpenEdge-Progress/amb.openedge
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
DEF VAR cset AS CHAR EXTENT 4 INIT [
|
||||
"the,that,a",
|
||||
"frog,elephant,thing",
|
||||
"walked,treaded,grows",
|
||||
"slowly,quickly"
|
||||
].
|
||||
|
||||
FUNCTION getAmb RETURNS CHARACTER (
|
||||
i_cwords AS CHAR,
|
||||
i_iset AS INT
|
||||
):
|
||||
|
||||
DEF VAR cresult AS CHAR.
|
||||
DEF VAR ii AS INT.
|
||||
DEF VAR cword AS CHAR.
|
||||
|
||||
DO ii = 1 TO NUM-ENTRIES( cset [ i_iset ] ) WHILE NUM-ENTRIES( cresult, " " ) < EXTENT( cset ):
|
||||
|
||||
cword = ENTRY( ii, cset[ i_iset ] ).
|
||||
IF i_cwords = "" OR
|
||||
SUBSTRING( i_cwords, LENGTH( i_cwords ), 1 ) = SUBSTRING( cword, 1, 1 )
|
||||
THEN DO:
|
||||
IF i_iset = EXTENT ( cset ) THEN
|
||||
cresult = i_cwords + " " + cword.
|
||||
ELSE
|
||||
cresult = getAmb( i_cwords + " " + cword, i_iset + 1 ).
|
||||
END.
|
||||
|
||||
END.
|
||||
|
||||
RETURN cresult.
|
||||
|
||||
END FUNCTION. /* getAmb */
|
||||
|
||||
|
||||
MESSAGE getAmb( "", 1 ) VIEW-AS ALERT-BOX.
|
||||
Loading…
Add table
Add a link
Reference in a new issue