? How to assign value to every element in array smilebasic3 (Page 1) ● SmileBASIC Source Forums

Sign In

Register
*Usernames are case-sensitive
Forgot my password

How to assign value to every element in array smilebasic3

  • #1 ✎ 20 bluemonkey1111 Third Year My account is over 3 years old Website Avatar Taboo I didn't change my avatar for 180 days Website OSP Contest 2 Contest Participant I participated in the second SmileBASIC Source OSP Contest! DIM ARRAY[13] I have an array like so I want every element to have a value equal to it’s number Basically, I want something that functions like this: ARRAY[1]=1 ARRAY[2]=2 ARRAY[3]=3 ... But as a loop kinda thing Sorry if that confused you, I’m kind of a beginner at this even though I’ve been here years Posted
  • #2 ✎ 6 Na_trium Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Video Games I like to play video games! Hobbies FOR I=0 TO 12 ARRAY[I]=I NEXT This code changes the value of I from 0 to 12 and does ARRAY[I]=I. Posted
  • #3 ✎ 20 bluemonkey1111 Third Year My account is over 3 years old Website Avatar Taboo I didn't change my avatar for 180 days Website OSP Contest 2 Contest Participant I participated in the second SmileBASIC Source OSP Contest! It worked. Thanks! Posted Edited by bluemonkey1111