J JDarter Member Licensed User Longtime User Sep 4, 2011 #1 What am I doing wrong? The code below using a simple list.add command returns a compilation error saying "java 474: not a statement" The checkbox for the core library is checked. Why doesn't this work? Sub Button2_Click Dim List1, x as Long List1.Initialize For x=0 to 9 List1.Add(x) Next x End Sub
What am I doing wrong? The code below using a simple list.add command returns a compilation error saying "java 474: not a statement" The checkbox for the core library is checked. Why doesn't this work? Sub Button2_Click Dim List1, x as Long List1.Initialize For x=0 to 9 List1.Add(x) Next x End Sub
J JDarter Member Licensed User Longtime User Sep 4, 2011 #3 That was just a typo on my part... the line should be: Dim List1 as List, x as Long but it still doesn't work! Any ideas?? Upvote 0
That was just a typo on my part... the line should be: Dim List1 as List, x as Long but it still doesn't work! Any ideas??
K kickaha Well-Known Member Licensed User Longtime User Sep 4, 2011 #4 Try B4X: Sub Button2_Click Dim List1 As List, x as Long List1.Initialize For x=0 to 9 List1.Add(x) Next End Sub As you should not specify "x" in the next statement line. Upvote 0
Try B4X: Sub Button2_Click Dim List1 As List, x as Long List1.Initialize For x=0 to 9 List1.Add(x) Next End Sub As you should not specify "x" in the next statement line.
tremara1 Active Member Licensed User Longtime User Sep 4, 2011 #5 Try This next instead of next x Upvote 0
J JDarter Member Licensed User Longtime User Sep 4, 2011 #6 That did it! Using just NEXT instead of NEXT x fixed the bogus List error I was getting. Thanks for saving my sanity lol. Upvote 0
That did it! Using just NEXT instead of NEXT x fixed the bogus List error I was getting. Thanks for saving my sanity lol.