[Gambas-user] Help getting error I cant find why

jbskaggs jbskaggs at ...1871...
Wed Apr 9 21:17:20 CEST 2008


In my program I have a simple rnd functions There are five of them.  Each are
nearly identical excet the fifth which gives an error:

http://www.nabble.com/file/p16594566/Screenshot-2.png Screenshot-2.png 




This DOES NOT work:


'random lastname
  DIM bbb AS Integer
DIM lastname AS Integer

lastname = Rnd(900)
bbb = 0 

IF lastname = 0 THEN txtLastname.text = "Ashbrow" 
 bbb += 1  
IF lastname = bbb THEN txtLastname.text = "Agberg" 
 bbb += 1  
IF lastname = bbb THEN txtLastname.text = "Aginstoke" 
 bbb += 1 
 and so on till all the list is checked





But this does work:

  'random female name
  DIM aaa AS Integer
DIM firstname AS Integer

firstname = Rnd(928) 
 
aaa = 0 
IF firstname = 0 THEN txtMidname.text = "Abrielle"
 aaa += 1  
IF firstname = aaa THEN txtMidname.text = "Abra"
 aaa += 1  
IF firstname = aaa THEN txtMidname.text = "Abree"
 aaa += 1  
IF firstname = aaa THEN txtMidname.text = "Abri"
 aaa += 1  
IF firstname = aaa THEN txtMidname.text = "Abriana"
 aaa += 1  
IF firstname = aaa THEN txtMidname.text = "Abrianna"
 aaa += 1  
IF firstname = aaa THEN txtMidname.text = "Abrielle"
 aaa += 1  

and so on till checked.

I know what function is having error but I don't know what item in function
is causing the error.

Please help.

JB Skaggs
-- 
View this message in context: http://www.nabble.com/Help-getting-error-I-cant-find-why-tp16594566p16594566.html
Sent from the gambas-user mailing list archive at Nabble.com.





More information about the User mailing list