Readline interface: Difference between revisions

Added 11l
(Added 11l)
Line 16:
 
__TOC__
 
=={{header|11l}}==
{{trans|D}}
 
<lang 11l>[String] histArr
 
F hello()
print(‘Hello World!’)
:histArr [+]= ‘hello’
 
F hist()
I :histArr.empty
print(‘No history’)
E
L(cmd) :histArr
print(‘ - ’cmd)
:histArr [+]= ‘hist’
 
F help()
print(‘Available commands:’)
print(‘ hello’)
print(‘ hist’)
print(‘ exit’)
print(‘ help’)
:histArr [+]= ‘help’
 
print(‘Enter a command, type help for a listing.’)
 
L
V line = input(‘>’)
I line == ‘exit’
L.break
I line == ‘hist’
hist()
E I line == ‘hello’
hello()
E
help()</lang>
 
=={{header|C}}==
1,480

edits