[BUG] INPUT -- myriad bugs
|
09-16-2014, 07:09 PM
(This post was last modified: 09-16-2014 08:10 PM by Han.)
Post: #1
|
|||
|
|||
[BUG] INPUT -- myriad bugs
Despite specifying a real-type only input variable, the editline insists on inserting single quotes around values. So when a user enters -3 it appears as '-3' on the editline. This of course leads into an invalid input error.
On top of that, the editline is then replaced with the topmost editline from the history -- but not the RPN history, it grabs it from the non-RPN home screen's history. 2 bugs in one... not exactly a bargain :-( Edit: Looks like it is even worse than I thought. Code: EXPORT INEX() Now, enter in the values 3, 4, 5, 6, 7, 8, 9 and leave the two checkboxes checked. The output is: { 1, 1, 5, 6, 7, 8, 9, 0, 0 } -- THIS IS WRONG! Again use 3, 4, 5, 6, 7, 8, 9 and now leave the checkboxes unchecked! -- same output?! So the checkboxes do absolutely nothing! I started to suspect the an off-by-one error tied to the line number of a field. So I moved tmode and wmode checkboxes to front of the varslist, and this is now the output: { 5, 6, 7, 8, 9, [0], [0], 3, 4} ?! Notice the [0]'s There is yet ANOTHER bug with INPUT: if a variable is a choosebox type, and is not the last entry in the variables list, then the emulator crashes. If it doesn't crash, then the list is returned as the result, rather than the choice... Long story short, DON'T USE THE ADVANCED FORM OF INPUT() in firmware 6030! Graph 3D | QPI | SolveSys |
|||
09-17-2014, 01:36 PM
Post: #2
|
|||
|
|||
RE: [BUG] INPUT -- myriad bugs
(09-16-2014 07:09 PM)Han Wrote: Now, enter in the values 3, 4, 5, 6, 7, 8, 9 and leave the two checkboxes checked. The output is: { 1, 1, 5, 6, 7, 8, 9, 0, 0 } -- THIS IS WRONG! Again use 3, 4, 5, 6, 7, 8, 9 and now leave the checkboxes unchecked! -- same output?! So the checkboxes do absolutely nothing! With firmware 6031 the first example gives the same result. Unchecking the boxes results in INEX {0, 0, 5, 6, 7, 8, 9, 0, 0} which is closer to correct! Tom L Tom L Cui bono? |
|||
09-24-2014, 02:32 AM
Post: #3
|
|||
|
|||
RE: [BUG] INPUT -- myriad bugs
export in5()
begin // checkbox mods local md,d,fcd,fyd,bw; input({{md,1},{d,1},{fcd,1},{fyd,1},{bw,1}},"turn on variables"); input(md,"momento"); input(d,"trquinho"); input(fcd,"fcd"); input(fyd,"fyd"); input(bw,"bw"); A:=md/(d*(1-0.4*(1.25-sqrt(1.5624-md/(bw*d²*fcd)/0.272)))*fyd); print(); print("Área de aço = "); print(A); end; SOMEONE CAN HELP ME PLEASE?! |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)