Post Reply 
Why is INPUT such a Rube Goldberg?
12-17-2014, 03:04 PM
Post: #5
RE: Why is INPUT such a Rube Goldberg?
Hi Han,
Thank you for your reply. I didn't articulate myself as well as I should have. I was trying to give pseduo-code examples, which on a second reading leave a bit to be desired.

My larger question was whether making INPUT more of an object oriented-like function was possible/feasible.

Currently, more complex uses of INPUT such as the following (Thanks Giancarlo) will get the job done, but are arguably tough to read and debug, particularly for the novice (ie the student who this Prime is in theory aimed at).
INPUT({{A,[2],{15,35,1}},{B,2,{15,5,2}},{C,2,{55,15,2}},{D,{"uno","due","tre","12345678901234567801234567890123"},{20,70,3}}}, "Main title",{"Name", "Male","Female","children"},{"string A","flag B","flag C","How many children"},{"",0,0,0},{"",0,0,0})

Where as the use of discrete objects such as (very bad psuedo code to follow) maybe useful:
INPUT_GROUP((INPUT(A,"title","input","description")),(CHKBOX({B,1},{C,1},"label 1","label 2"}));

Which could also be rewritten:
I1:=INPUT(A,"title","input","description");
I2:=CHKBOX({B,1},{C,1},"label 1","label 2"});
INPUT_GROUP(I1,I2);

allowing for easier interface building and greater clarity in the final code. Keeping in mind that elements such as variable type, object position, object color, etc. are not included above for clarity, but would be in the actual implementation.

As before, it is simply food for thought.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Why is INPUT such a Rube Goldberg? - acmeanvil - 12-17-2014 03:04 PM



User(s) browsing this thread: 1 Guest(s)