Author Topic: Using For To Wait For Output  (Read 9611 times)

0 Members and 1 Guest are viewing this topic.

Offline nathanpc

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 16
  • Rating: +0/-0
    • View Profile
    • Building It
Using For To Wait For Output
« on: September 07, 2010, 08:54:42 am »
Hello,
 I'm learning TI-BASIC and I want to do this(here is pseudo-code):
Code: [Select]
: ClrHome
: For(...)
: Output(3,1,"WELCOME")
: End
: For(...)
: Output(4,2,"TO THE")
: End
: For(...)
: Output(5,3,"TI WORLD!")
: End
But how I can use FOR to display that when passed 1 second(for the first one) and 500ms for the others?

Best Regards,
 Nathan Paulino Campos
Development Languages C/C++ - Java - Java EE - Java ME - C# - Visual Basic - Assembly - Delphi - WML - Pascal - Ruby
Assembly Knowledge x86 - 8086 - ARM - MIPS - 6502
BASIC Knowledge TI-BASIC - Commodore 64 BASIC - QBASIC

Follow me at Twitter and get a free cookie :P

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: Using For To Wait For Output
« Reply #1 on: September 07, 2010, 09:25:09 am »
Use rand(X) where X is a number that will give you the desired length. (positive integer only)

Also, welcome to Omnimaga! :)
« Last Edit: September 07, 2010, 09:25:34 am by Raylin »
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







Offline nathanpc

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 16
  • Rating: +0/-0
    • View Profile
    • Building It
Re: Using For To Wait For Output
« Reply #2 on: September 07, 2010, 09:58:40 am »
Thanks very much for the welcome! But how I could put the RAND command on my source. Because I can't see anything like it on the Prgm menu. :(

Best Regards
Development Languages C/C++ - Java - Java EE - Java ME - C# - Visual Basic - Assembly - Delphi - WML - Pascal - Ruby
Assembly Knowledge x86 - 8086 - ARM - MIPS - 6502
BASIC Knowledge TI-BASIC - Commodore 64 BASIC - QBASIC

Follow me at Twitter and get a free cookie :P

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: Using For To Wait For Output
« Reply #3 on: September 07, 2010, 10:03:32 am »
rand is a MATH function. You can find it either using the Catalog which is [2ND][0] or [MATH][<].
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







Offline nathanpc

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 16
  • Rating: +0/-0
    • View Profile
    • Building It
Re: Using For To Wait For Output
« Reply #4 on: September 07, 2010, 10:12:27 am »
Thanks very much! It works, but let me guess one thing: rand(100) will be the same of 1 second?
Also, when I put rand(1000) it gave me an error saying: "Invalid Dim"
« Last Edit: September 07, 2010, 10:13:05 am by nathanpc »
Development Languages C/C++ - Java - Java EE - Java ME - C# - Visual Basic - Assembly - Delphi - WML - Pascal - Ruby
Assembly Knowledge x86 - 8086 - ARM - MIPS - 6502
BASIC Knowledge TI-BASIC - Commodore 64 BASIC - QBASIC

Follow me at Twitter and get a free cookie :P

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: Using For To Wait For Output
« Reply #5 on: September 07, 2010, 10:35:55 am »
You can't put rand(1000) because the OS can only have a maximum of 999 elements in a list.
Since this is the case, one can't put 1000.
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







Offline nathanpc

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 16
  • Rating: +0/-0
    • View Profile
    • Building It
Re: Using For To Wait For Output
« Reply #6 on: September 07, 2010, 10:45:58 am »
So if I want a 10 seconds wait I just need to do something like
Code: [Select]
rand(500)
rand(500)
More Code...
This will have the same effect of rand(1000). Correct?
Development Languages C/C++ - Java - Java EE - Java ME - C# - Visual Basic - Assembly - Delphi - WML - Pascal - Ruby
Assembly Knowledge x86 - 8086 - ARM - MIPS - 6502
BASIC Knowledge TI-BASIC - Commodore 64 BASIC - QBASIC

Follow me at Twitter and get a free cookie :P

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: Using For To Wait For Output
« Reply #7 on: September 07, 2010, 11:04:46 am »
Yep. :)
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







Offline nathanpc

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 16
  • Rating: +0/-0
    • View Profile
    • Building It
Re: Using For To Wait For Output
« Reply #8 on: September 07, 2010, 11:10:11 am »
Wonderful! Thanks very much for your help! :)
Development Languages C/C++ - Java - Java EE - Java ME - C# - Visual Basic - Assembly - Delphi - WML - Pascal - Ruby
Assembly Knowledge x86 - 8086 - ARM - MIPS - 6502
BASIC Knowledge TI-BASIC - Commodore 64 BASIC - QBASIC

Follow me at Twitter and get a free cookie :P

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: Using For To Wait For Output
« Reply #9 on: September 07, 2010, 11:19:57 am »
No problem. :)
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Using For To Wait For Output
« Reply #10 on: September 07, 2010, 12:39:39 pm »
Hi and welcome here Nathanpc! Good luck learning TI-BASIC and your future programming projects :)

Offline nathanpc

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 16
  • Rating: +0/-0
    • View Profile
    • Building It
Re: Using For To Wait For Output
« Reply #11 on: September 07, 2010, 12:48:16 pm »
Thanks very much. I'm learning TI-BASIC to understand better how the machine works. Then my goal is set to learn some of z80 Assembly. Since I'm an Assembly Guy, that know x86, 8086, 6502, MIPS and the painful ARM Assembly. :)
Development Languages C/C++ - Java - Java EE - Java ME - C# - Visual Basic - Assembly - Delphi - WML - Pascal - Ruby
Assembly Knowledge x86 - 8086 - ARM - MIPS - 6502
BASIC Knowledge TI-BASIC - Commodore 64 BASIC - QBASIC

Follow me at Twitter and get a free cookie :P

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Using For To Wait For Output
« Reply #12 on: September 07, 2010, 01:23:15 pm »
Thanks very much. I'm learning TI-BASIC to understand better how the machine works. Then my goal is set to learn some of z80 Assembly. Since I'm an Assembly Guy, that know x86, 8086, 6502, MIPS and the painful ARM Assembly. :)
Don't diss the ARM assembly :P
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Using For To Wait For Output
« Reply #13 on: September 07, 2010, 02:00:15 pm »
But ARM ASM seems really cool, especially for the Nspire D:

I understand learning ASM can be much harder for some people, though. I think it may be due to how certain tutorials (such as 28 days) are written, though. People who are visual may have an hard time learning ASM by relying only on it.

Offline nathanpc

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 16
  • Rating: +0/-0
    • View Profile
    • Building It
Re: Using For To Wait For Output
« Reply #14 on: September 07, 2010, 02:03:02 pm »
Thanks very much. I'm learning TI-BASIC to understand better how the machine works. Then my goal is set to learn some of z80 Assembly. Since I'm an Assembly Guy, that know x86, 8086, 6502, MIPS and the painful ARM Assembly. :)
Don't diss the ARM assembly :P
I've just said that is very difficult, I'm not dissing any language. Sorry about my bad english.
« Last Edit: September 07, 2010, 02:07:26 pm by nathanpc »
Development Languages C/C++ - Java - Java EE - Java ME - C# - Visual Basic - Assembly - Delphi - WML - Pascal - Ruby
Assembly Knowledge x86 - 8086 - ARM - MIPS - 6502
BASIC Knowledge TI-BASIC - Commodore 64 BASIC - QBASIC

Follow me at Twitter and get a free cookie :P