Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
16
Task/Mad-Libs/Icon/mad-libs.icon
Normal file
16
Task/Mad-Libs/Icon/mad-libs.icon
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
procedure main()
|
||||
ml := "<name> went for a walk in the park. There <he or she> _
|
||||
found a <noun>. <name> decided to take it home." # sample
|
||||
MadLib(ml) # run it
|
||||
end
|
||||
|
||||
link strings
|
||||
|
||||
procedure MadLib(story)
|
||||
write("Please provide words for the following:")
|
||||
V := []
|
||||
story ? while ( tab(upto('<')), put(V,tab(upto('>')+1)) )
|
||||
every writes(v := !set(V)," : ") do
|
||||
story := replace(story,v,read())
|
||||
write("\nYour MadLib follows:\n",story)
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue