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
»
TI-BASIC
»
List help
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: List help (Read 3094 times)
0 Members and 1 Guest are viewing this topic.
trevmeister66
LV9
Veteran (Next: 1337)
Posts: 1009
Rating: +14/-5
List help
«
on:
November 16, 2007, 01:44:00 am »
What would be the fastest way to move every value in a list up one position in the list (thus deleting the last number in the list, and adding a new one at the beginning)?
Example:
{1,2,3,4,5->L1
//What would I do here?
#->L1(1
L1 = {#,1,2,3,4
Logged
Projects: nameless RPG: 1.0% |
Reverse Snake v1.5:
100% | Secret Project: 5% | DUNGEON: 70%
My
MW2 Blog
<-- Please visit
JonimusPrime
LV6
Super Member (Next: 500)
Posts: 389
Rating: +25/-5
List help
«
Reply #1 on:
November 16, 2007, 02:06:00 am »
c1-->
CODE
ec1
Agument({#},L1->
dim(L1)-1->L1c2
ec2
that should do it but ti think I spelled that comand wrong.
Logged
"Always code as if the person who will maintain your code is a maniac serial killer that knows where you live" -Unknown
"If you've done something right no one will know that you've done anything at all" -Futurama
"Have a nice day, or not, the choice is yours." Tom Steiner
DJ Omnimaga
Clacualters are teh gr33t
CoT Emeritus
LV15
Omnimagician (Next: --)
Posts: 55943
Rating: +3154/-232
CodeWalrus founder & retired Omnimaga founder
List help
«
Reply #2 on:
November 16, 2007, 04:00:00 am »
Augment*?
Logged
trevmeister66
LV9
Veteran (Next: 1337)
Posts: 1009
Rating: +14/-5
List help
«
Reply #3 on:
November 16, 2007, 09:46:00 am »
Sweet it worked
Thanks.
Logged
Projects: nameless RPG: 1.0% |
Reverse Snake v1.5:
100% | Secret Project: 5% | DUNGEON: 70%
My
MW2 Blog
<-- Please visit
Speler
LV8
Addict (Next: 1000)
Posts: 857
Rating: +6/-2
List help
«
Reply #4 on:
November 16, 2007, 02:15:00 pm »
No problem (See! I can be helpful sometimes!)
Logged
JonimusPrime
LV6
Super Member (Next: 500)
Posts: 389
Rating: +25/-5
List help
«
Reply #5 on:
November 17, 2007, 05:32:00 am »
QuoteBegin-Super Speler+16 Nov, 2007, 20:15-->
QUOTE
(Super Speler @ 16 Nov, 2007, 20:15)
No problem (See! I can be helpful sometimes!)
Wait I posted the code Not you Speler? :
:
Logged
"Always code as if the person who will maintain your code is a maniac serial killer that knows where you live" -Unknown
"If you've done something right no one will know that you've done anything at all" -Futurama
"Have a nice day, or not, the choice is yours." Tom Steiner
Speler
LV8
Addict (Next: 1000)
Posts: 857
Rating: +6/-2
List help
«
Reply #6 on:
November 17, 2007, 06:56:00 am »
I was posting in the wrong topic... sorry.
Logged
JoostinOnline
LV2
Member (Next: 40)
Posts: 24
Rating: +0/-1
List help
«
Reply #7 on:
November 17, 2007, 09:16:00 am »
QuoteBegin-Super Speler+17 Nov, 2007, 12:56-->
QUOTE
(Super Speler @ 17 Nov, 2007, 12:56)
I was posting in the wrong topic... sorry.
Of course you were
Logged
"Mac's are the Perfect Computer", said the Perfect Idiot.
Harrierfalcon
Guest
List help
«
Reply #8 on:
November 17, 2007, 09:40:00 am »
c1-->
CODE
ec1?List(cumSum(L1→L1c2
ec2(A lot faster during 100 repetitions) and smaller by 10 bytes.
Logged
simplethinker
LV7
Elite (Next: 700)
Posts: 695
Rating: +16/-5
snjwffl
List help
«
Reply #9 on:
November 17, 2007, 10:26:00 am »
That cuts out the first element and doesn't add on a new one.
@trevmeister66, if you wanted to move everything down (left in your list) and cut off the first element and add a new number to the end(which is the exact opposite of what you're doing now) you can use c1-->
CODE
ec1?List(cumsum(augment(L1,{Nc2
ec2
which is 7 shorter. All you would have to do is switch your list around.
Logged
"We've all heard that a million monkeys banging on a million typewriters will eventually reproduce the entire works of Shakespeare. Now, thanks to the Internet, we know this is not true." -- Professor Robert Silensky
Chip's Challenge: ħ%
Print
Pages: [
1
]
Go Up
« previous
next »
Omnimaga
»
Forum
»
Calculator Community
»
TI Calculators
»
TI-BASIC
»
List help