Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
About
Team
Rules
Stats
Status
Sitemap
Chat
Downloads
Forum
News
Our Projects
Major Community Projects
Recent Posts
Unread Posts
Replies
Tools
SourceCoder3
Other Things...
Omnimaga Radio
TI-83 Plus ASM File Unsquisher
Z80 Conversion Tools
IES TI File Editor
Free RAM areas
Comprehensive Getkeyr table
URL Shortener
Online Axe Tilemap Editor
Help
Contact Us
Change Request
Report Issue/Bug
Team
Articles
Members
View the memberlist
Search For Members
Buddies
Login
Register
Omnimaga
»
Forum
»
Calculator Community
»
TI Calculators
»
Lua
»
Find nth element in a set?
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Find nth element in a set? (Read 3193 times)
0 Members and 1 Guest are viewing this topic.
TheNlightenedOne
LV6
Super Member (Next: 500)
Posts: 427
Rating: +16/-1
Find nth element in a set?
«
on:
March 28, 2013, 11:07:10 am »
I'm using math.eval to generate a set. How do I find the nth element of that set from Lua?
Logged
"Eris" (Ndless 3.1)
"Keto" (Ndless 3.1)
"Luna" (AMS 3.10, HW4)
"Aurora" (2.55MP)
Adriweb
Editor
LV10
31337 u53r (Next: 2000)
Posts: 1708
Rating: +229/-17
Re: Find nth element in a set?
«
Reply #1 on:
March 28, 2013, 11:17:23 am »
I'm not sure what you mean, but simply calling it the normal way would work ?
myTable[n] ?
(works in Basic and in Lua, but if done in Lua, it would require you to have var.recall()
ed
it first, of course...)
«
Last Edit: March 28, 2013, 11:17:31 am by adriweb
»
Logged
My calculator programs
TI-Planet.org
co-admin.
TI-Nspire Lua programming
:
Tutorials
|
API Documentation
TheNlightenedOne
LV6
Super Member (Next: 500)
Posts: 427
Rating: +16/-1
Re: Re: Find nth element in a set?
«
Reply #2 on:
March 28, 2013, 12:21:28 pm »
Can I use that to randomize the order of the elements?
EDIT: nevermind, I realized I can pass a math.eval into a table as an argument. Thanks adriweb
Logged
"Eris" (Ndless 3.1)
"Keto" (Ndless 3.1)
"Luna" (AMS 3.10, HW4)
"Aurora" (2.55MP)
Print
Pages: [
1
]
Go Up
« previous
next »
Omnimaga
»
Forum
»
Calculator Community
»
TI Calculators
»
Lua
»
Find nth element in a set?