Therad2 wrote:
I am going to be finishing my program in basic before I start trying out making an ICE program. (I don't like unfinished projects). I have gotten very far on making my login screen when I started thinking about the apps I would have for my desktop. One of the apps that was a must have is a calendar (a reminder sort of thing for a week using 7 of the strings) the main reason I was making different accounts was 1: to save settings and 2: to save personalized things like the calendar. The problem is that I could only do one calendar because there is only 10 strings (and that kind of defeats the purpose of the accounts) so should I keep the (3 and guest) accounts as a coolness factor or should I only have one guest account and one account (guest account and 1 for me)(of course the personalized things like the calendar would not be accessible by the guest account.) sorry for the long paragraph and spelling errors.

Edit: by getting rid of the other 2 accounts I would gain 2 strings that I could later use.

I would recommend using encoded lists instead of strings, as you can create as many lists as you want, providing enough storage is available. To convert a list to a string and vice versa, check out the list to string and string to list routines. These can easily be adjusted to include multiple strings (for example, seven days of the week) in one list.

Therad2 wrote:
Than is there an input for that screen? (to enter letters and numbers)

There is an Input command that works similarly to its TI-Basic counterpart, however it will not work once you have initialized graphics, so you will probably want to write a simple custom input routine like Pieman suggested.
Thanks lots (: I was kind of thinking about trying to change strings into something else but I kind of gave up on it.
I don't know why but I tried the code and it did not work (for both of them) if I did something wrong I have no idea.
I put the code:


Code:
:1+seq(inString("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ ",sub(Str1,A,1)),A,1,length(Str1→L₁



But it sent out a syntax error and pointing at the storing arrow (→)from Str1 to L₁ Sad
I don't know why because this basic coding is way out of my league so please help.
Are you sure you typed the code correctly? I just tried it myself and verified that it does work.
did You use a ti 84+ ?
I was messing around with text clearing on the graph screen and optimizing it (getting rid of non ended ifs) and I wanted to see how fast I could get it. I copied it into a different program and made it repeat with black so I could see it. I was looking at it and then I realized: it was an amazing fake (sry but I love these kinds of things to make it seem real) loading bar. Here is the code and I was wondering if there are any ways to make the code smaller or faster because I feel it could be shrunk down to make it look cooler and for the text clearing. (besides making it thinner/shorter). Thanks (:


Code:
Lbl A
ClrDraw
101→A
110→B
Repeat A=161
Pt-On(A,B,1,Black)
B-3→B
If B=104
Then
110→B
A+3→A
End
End
Goto A
There was a bit of a mess up because when I used the list to string it would make it 2 letters forward (Ex: I would store hi into the list and when I took it out of the list it would say jk)(and then I thought it was a joke lol) and to fix that I just made the string to list -1 (than the rest)

Ex:
From

Code:
1+seq(inString("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ ",sub(Str1,A,1)),A,1,length(Str1→L₁

To

Code:
-1+seq(inString("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ ",sub(Str1,A,1)),A,1,length(Str1→L₁


And it now works perfectly Very Happy
(But I am wondering if I just messed something up while typing it in)
Edit: that was just a symbol so I jus changed it to 1 to show that you are typing in numbers. But now it is putting out an error for invalid detentions when storing the stuff into str2 (shown in the code) please help because I am not sure how this works and this will be a very important part in my prgm.


Code:
1->U
" ->Str2
Repeat max(K={105,45,23
Text(17,0,Str2
Text(0,250,sub("Aa1",U,1
getKey->K
If K=31:Then
Text(0,256," 
3fPart(U/3)+1->U
End
If K>40
Str2+sub("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz 7894561230.-",(K-   (40+7(K>50)+5(K>60)+5(K>70)+5(K>80)+5(K>90)+5(K>100)))+26(U>1)+26(U>2),1->Str2  // <------ error gets put out here when this line stores into Str2
End
sub(Str2,2,length(Str2)-2->Str2


Here is a link to the discussion if you want to make sure I did things right:
https://www.cemetech.net/forum/viewtopic.php?t=11771
(Just don't post on it because it is so old as said in the rules)
I was looking at the code of the custom text input in the ti basic developer. (Link here: http://tibasicdev.wikidot.com/custominput) and I understood most of it but where the "ans" is gotten from. It is a important peace in the code so I am confused pls help me understand:


Code:
:" →Str1 
:Repeat K=105
:Repeat Ans>40 and Ans<94 or Ans=105       //<--- the Ans here
:getKey→K
:End
:Ans-20-5int(.1Ans        //<----here
:If 25>length(Str1) and 0<Ans and Ans<29      //<----here
:Then
:Str1+sub("ABC  DEFGHIJKLMNOPQRSTUVWXYZ",Ans,1→Str1     //<---- (and most importantly) here
:Text(10,1,Str1
:End
:End
:If 1<length(Str1
:sub(Str1,2,length(Str1)-1→Str1
Therad2 wrote:
I was looking at the code of the custom text input in the ti basic developer. (Link here: http://tibasicdev.wikidot.com/custominput) and I understood most of it but where the "ans" is gotten from. It is a important peace in the code so I am confused pls help me understand:


Code:
:" →Str1 
:Repeat K=105
:Repeat Ans>40 and Ans<94 or Ans=105       //<--- the Ans here
:getKey→K
:End
:Ans-20-5int(.1Ans        //<----here
:If 25>length(Str1) and 0<Ans and Ans<29      //<----here
:Then
:Str1+sub("ABC  DEFGHIJKLMNOPQRSTUVWXYZ",Ans,1→Str1     //<---- (and most importantly) here
:Text(10,1,Str1
:End
:End
:If 1<length(Str1
:sub(Str1,2,length(Str1)-1→Str1


The Ans token basically just returns the value of the last expression. The TI|BD article I linked does a better job of explaining it, but the main advantage of Ans is that you don't have to store numbers, strings, or any data type into a variable, which helps with optimization quite a bit.
But what is put into the Ans? If it takes the last thing you entered, what does it come from in the code?
Here, I went over each occurrence of Ans in the code and explained what it would be:

Code:
:" →Str1 
:Repeat K=105
:Repeat Ans>40 and Ans<94 or Ans=105       // Here Ans is K, or the key that was just pressed, because storing to a variable also results in Ans being that value
:getKey→K
:End
:Ans-20-5int(.1Ans        // Ans is still the key pressed. This code is to modify Ans so the key code works well with the next part
:If 25>length(Str1) and 0<Ans and Ans<29      // Ans is now whatever the result of the previous line was
:Then
:Str1+sub("ABC  DEFGHIJKLMNOPQRSTUVWXYZ",Ans,1→Str1     // Ans has not been modified yet, so it is still the same number it was before
:Text(10,1,Str1
:End
:End
:If 1<length(Str1
:sub(Str1,2,length(Str1)-1→Str1

Hope this makes sense Smile
Wow thank you! Good Idea it makes a lot more sense now!
For the part where they are changing Ans, why not just do Ans - 40?
Ex:


Code:
:" →Str1 
:Repeat K=105
:Repeat Ans>40 and Ans<94 or Ans=105
:getKey→K
:End
:Ans-20-5int(.1Ans                     <---- this line into Ans-40 so that all of the letters are from 1 to 26   
:If 25>length(Str1) and 0<Ans and Ans<29
:Then
:Str1+sub("ABC  DEFGHIJKLMNOPQRSTUVWXYZ",Ans,1→Str1
:Text(10,1,Str1
:End
:End
:If 1<length(Str1
:sub(Str1,2,length(Str1)-1→Str1
That's because keycodes aren't like that in TI-Basic (I point you to the TI|BD keycodes page). Also, you might notice that there are two spaces in between the C and D in that code. This is because there are two keys ([vars] and [clear]) in between those letters on the keypad, so the string is actually 28 characters long. However, due to the way the keycodes are, you can't just subtract a constant number from the keycodes, so this expression is used to convert the keycode to a number from 1 to 28.
Thank you Smile
I just finished my sign-in program Very Happy I decided to wait on making the actual desktop until I know what I am going to put on it (so I don't have to keep editing the screen). My favorite of my ideas for different apps was a calendar. I would have you be able to enter in different things to that would remind you (I would make the program ask the date and time when you enter in). Since there are not many strings, I would change them into lists. My problem is that I can't figure out how to make it so I can do different lists with only about one line of code. It would be kind of like this but this doesn't work:


Code:

:"ABC"→str1
:{1,2,3,4}→ʟstr1        // I would be able to use just one line (and I would do if statements to change the string (list).
As far as I recall, what you’re trying to do is impossible (have a list’s name as a string). This would work, though:

Code:
{1,2,3,4}->LABC
As far as I recall, what you’re trying to do is impossible (have a list’s name as a string). This would work, though:

Code:
{1,2,3,4}->LABC
Oh dang. That would mean I will have to do 30 different lists Dry
Edit: actually because I have 3 different accounts, I would have to do 90 different lists Sad
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 2 of 3
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement