? 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
dfrost2
Updated
Rating
0 votes
Categories
Keywords
  • get
2 Comment(s) Minxrod Minxrod Summer 2016 Contest Participant I participated in the SmileBASIC Source Summer 2016 Contest! Programming Contest Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Pokemon Is Awesome! I love Pokemon! Express Yourself Array of length 20 and you store to element 20? Something is amiss. dfrost2 dfrost2 Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Minecraft Is Awesome! I love Minecraft! Express Yourself oops! Ill edit