Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,13 @@
|
|||
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
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
requires("0.8.2")
|
||||
class dc dynamic
|
||||
-- public string fred = "555" -- (predefine some fields if you like)
|
||||
end class
|
||||
dc d = new()
|
||||
|
||||
while 1 do
|
||||
string name = prompt_string("Enter name or press Enter to quit:")
|
||||
if length(name)=0 then exit end if
|
||||
bool bExists = (get_field_type(d,name)!=NULL)
|
||||
-- bool bExists = string(d[name]) -- alt...
|
||||
string prompt = iff(not bExists?"No such name, enter a value:"
|
||||
:sprintf("Already exists, new value[%s]:",{d[name]}))
|
||||
string data = prompt_string(prompt)
|
||||
if length(data) then
|
||||
d[name] = data
|
||||
end if
|
||||
end while
|
||||
Loading…
Add table
Add a link
Reference in a new issue