14 lines
472 B
Plaintext
14 lines
472 B
Plaintext
constant globals = new_dict()
|
|
|
|
while 1 do
|
|
string name = prompt_string("Enter name or press Enter to quit:")
|
|
if length(name)=0 then exit end if
|
|
bool bExists = (getd_index(name,globals)!=NULL)
|
|
string prompt = iff(not bExists?"No such name, enter a value:"
|
|
:sprintf("Already exists, new value[%s]:",{getd(name,globals)}))
|
|
string data = prompt_string(prompt)
|
|
if length(data) then
|
|
setd(name,data,globals)
|
|
end if
|
|
end while
|