R Robban New Member Licensed User Longtime User Dec 30, 2011 #1 Trying to convert some of my vb code and got stuck. The code: Select Temp Case 300 To 399.9999999999 Sim = 43000 Case 400 To 499.9999999999 Sim = 36000 End Select Getting: Error compiling program. Error description: ',' expected. Occurred on line: 353 Select Temp Word: select Think it has to be the word "to" that is the problem.
Trying to convert some of my vb code and got stuck. The code: Select Temp Case 300 To 399.9999999999 Sim = 43000 Case 400 To 499.9999999999 Sim = 36000 End Select Getting: Error compiling program. Error description: ',' expected. Occurred on line: 353 Select Temp Word: select Think it has to be the word "to" that is the problem.
S Smee Well-Known Member Licensed User Longtime User Dec 30, 2011 #2 did you try Case 300 , 399.9999999999 Upvote 0
R Robban New Member Licensed User Longtime User Dec 30, 2011 #3 No but tried it now, it only works on the exact numbers. Upvote 0
NJDude Expert Licensed User Longtime User Dec 30, 2011 #4 That is correct in B4A 'Case' works with individual values, read this section of the manual. Upvote 0
S Smee Well-Known Member Licensed User Longtime User Dec 30, 2011 #5 change your logic to read <300 <400 etc Upvote 0