Page 8 of 12

Posted: Wed 27 Apr, 2005 12:24 am
by DarkerLine
dysfunction wrote:If you run out of vars you can always use lists, which only RAM limits the number of.
I try not to use lists for unrelated elements, if you're going to access them always with a constant index (for example, L1(1), L1(2), etc.) there's no point, but if you're going to apply operations to the whole list, or access a variable element of it (for example, L1(I)), then it's hard to replace with real variables.

Posted: Wed 27 Apr, 2005 2:17 am
by mnc2fan
I've been messing with some things in BASIC, archiving, unarchiving, text, pxl-change, output, input, interupts. So far I have put together a well, interesting program. I see a few things that could be optimized, just not sure how. Some help and advice would be nice. :twisted: :twisted:

Code: Select all

archive A                  ;used for password
clrdraw
circle(3,3,6
text(19,51,"circle                ;places text in center of circle
dim(rand(50
for(x,51,71
pxl-change(25,x
text(10,10,"enter
text(25,10,"user
text(54,36,"password
dim(rand(2
end
dim(rand(150
clrdraw
input A                              ;A=password
archive A                            archives password or number
Lbl Y
clrhome
input B
unarchive A
clrhome
if B<>A
then
output(4,1,"the password
output(5,1"entered is not correct
dim(rand(150
goto Y

Posted: Tue 03 May, 2005 12:29 am
by digiTsai
:o its possible to archive and unarchive through a program?

Posted: Tue 03 May, 2005 12:46 am
by DJ_O
only pictures, variables, not programs. You need codex to archive programs

Posted: Wed 04 May, 2005 12:24 am
by DarkerLine
Or any other library that allows you to either archive/unarchive programs or run assembly opcodes.

@mnc2fan:
1. you don't need the Archive A at the beginning, in fact it might crash the program when you try to input it.
2. You could replace the Lbl Y/Goto Y with a Repeat loop:

Code: Select all

Repeat B<>A
Archive A
clrhome 
input B 
unarchive A 
clrhome 
if B<>A 
then 
output(4,1,"the password 
output(5,1"entered is not correct 
dim(rand(150 
End
End
3. For the Circle(3,3,6 command you should really set the window values Xmin Xmax etc in the program.

Posted: Fri 06 May, 2005 12:38 am
by digiTsai
He probably should if he sets it as a starting program, so if someone turns the calc on, they can't just take the batteries out to clear the ram and the variable along with it if they can't get past the password.

Posted: Fri 06 May, 2005 9:10 pm
by DarkerLine
When you Archive A and then Input A I think you get an error.

Posted: Thu 12 May, 2005 8:25 pm
by Patori
Kevin wrote:only pictures, variables, not programs. You need codex to archive programs
why didn't TI allow this? Oh yeah.... I remember prgmA tries to Archive itself while running... hehe...

Posted: Sun 29 May, 2005 6:14 pm
by hornzfan3211
EDIT: sorry for what seemed to cause another "BASIC is for idiots" debate.

Kevin i admire all the work you do on the calc so im sorry for offending you :cry: :cry:

Posted: Sun 29 May, 2005 8:19 pm
by chronoflare
Never doubt the world's population of idiots.

Posted: Sun 29 May, 2005 8:42 pm
by KevinJB
BASIC was MADE for idiots...

Posted: Sun 29 May, 2005 8:45 pm
by DJ_O
I dont think your post above will stay on this forum for long. btw look at my signature first link

Posted: Sun 29 May, 2005 8:49 pm
by lloydkirk1989
edit: its not worth it...makes me mad that people make such ignorant remarks

Posted: Sun 29 May, 2005 8:53 pm
by DJ_O
hmm another post that will not stay her efor long though :roll: still if TI decided to disable prgm archiving in programs there is a reason: SOME people would be stupid enough to archive the running program, causing an error or even a crash. It's annoying for game programmers though, but its because TI philosophy is that calcs are for maths, not gaming :roll:

Posted: Sun 29 May, 2005 9:44 pm
by KevinJB
I dont think your post above will stay on this forum for long.
I think you misinterpreted it. Although I understand your point, allow me to explain what I meant by it.

When I said, 'BASIC was MADE for idiots', I meant that the language was not created with people that have an IQ higher than 12 in mind- it's meant to be crash proof, so that no unknowing buyer makes a quick program, then ends up crashing their calculator.

What I did not say was 'BASIC is ONLY for idiots'... meaning that there are people who can make it almost as powerful as assembly- like you, Kevin (btw we have the same name ;)). So, T.I is not going to risk the situation Patori stated.

Which means that, when they were deciding whether or not to include archiving programs, they said 'BASIC is not being made for advanced programmers. So if it can crash the calc in the hands of an idiot, we won't include archiving prgms'.

Sorry for the long explanation, I just didn't want that post to be take the wrong way. Remember, there is a difference between MADE for, and ONLY for. Perhaps I should have said 'made with idiots in mind'.