? custom command GET() ● SmileBASIC Source

Sign In

Register
*Usernames are case-sensitive
Forgot my password

custom command GET()

GET arguments

This custom command can allow you to get an element no matter its size, dimensions, or name. Here is the code(it's only 6 lines): DEF GET(ARRAY,OFFSET) DIM TEMP[3] COPY TEMP, 0, ARRAY, OFFSET,1 RETURN TEMP[0] END here is how to use it: DIM ARRAY[20,20] ARRAY[19,1] = 300 PRINT GET(ARRAY,40)'get 41'st index of ARRAY and PRINT it 300 OK
Author
DFrost
Updated
Rating
0 votes
Categories
Keywords
  • get
2 Comment(s) Minxrod Minxrod Third Year My account is over 3 years old Website Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Video Games I like to play video games! Hobbies Array of length 20 and you store to element 20? Something is amiss. DFrost DFrost Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength oops! Ill edit