Author Topic: Grammer  (Read 109095 times)

0 Members and 2 Guests are viewing this topic.

Offline Xeda112358

  • they/them
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Grammer
« Reply #210 on: October 19, 2011, 10:57:30 am »
>.> Well, that is a pretty neat way of getting around it. I actually did something similar when I made a prime sieve using Grammer (because it is faster). However, there are actually display functions and you can transfer between OS vars and Grammer vars. Here are some examples:
Code: [Select]
.0:Asm(prgmGRAMMER
Repeat A=15
ClrDraw
Repeat A
getKey→A
End
Text('0,0,A         ;Use Text(' to display numbers
DispGraph
End
Stop
Or you could do:
Code: [Select]
Repeat A=15
0:Asm(prgmGRAMMER
Repeat A
getKey→A
End
A→iA               ;i is the imaginary i, here
Stop
Output(1,1,"      ;2 space here
Output(1,1,A
End

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Grammer
« Reply #211 on: October 19, 2011, 11:26:45 am »

Offline Xeda112358

  • they/them
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Grammer
« Reply #212 on: October 19, 2011, 12:40:59 pm »
There is also a chart in the readme >.>

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Grammer
« Reply #213 on: October 19, 2011, 12:41:53 pm »
My pic was just a easy way to memorize getKey value XP

Offline Xeda112358

  • they/them
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Grammer
« Reply #214 on: October 19, 2011, 01:28:27 pm »
Okay, so I have added by request the factorial token. It pretty much means not(). I will explain in more detail later, but I have to go a few minutes ago XD. Ask yeong or suronome as they were the ones that requested it XD

later I will add the ability for While and Repeat

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Grammer
« Reply #215 on: October 19, 2011, 01:29:13 pm »
Hehe, now I count to one of the few grammer experts! :P

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Stefan Bauwens

  • Creator of Myst 89 - סטיבן
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1799
  • Rating: +162/-24
  • 68k programmer
    • View Profile
    • Portfolio
Re: Grammer
« Reply #216 on: October 19, 2011, 01:59:00 pm »

Lol, I could probably use that.
But it's true, what happened with 5,6,7,8,16 and 24? O_o

EDIT: Evil is involved: 5+6+7+8+16+24=66
« Last Edit: October 19, 2011, 02:13:15 pm by Stefan Bauwens »


Very proud Ticalc.org POTY winner (2011 68k) with Myst 89!
Very proud TI-Planet.org DBZ winner(2013)

Interview with me

Offline Xeda112358

  • they/them
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Grammer
« Reply #217 on: October 19, 2011, 02:07:28 pm »
That is just because of the way the hardware was set up :/ Also, i am working on trying to add the ! for While and Repeat loops, but I don't think it will be working XD

So here is what ! does. If the expression after it is 0, 1 is returned. Otherwise, 0 is returned for example, !3=4 returns 1, !3=3 returns 0.

if you put it before an If statement, instead of checking if the condition (or conditions) are true, it checks if they are false. Have fun :)

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Grammer
« Reply #218 on: October 19, 2011, 02:22:57 pm »
Lol, I could probably use that.
But it's true, what happened with 5,6,7,8,16 and 24? O_o

EDIT: Evil is involved: 5+6+7+8+16+24=66
I think 5,6,7 and 8 are for the diagonal directions.

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Grammer
« Reply #219 on: October 19, 2011, 03:01:24 pm »
Lol, I could probably use that.
But it's true, what happened with 5,6,7,8,16 and 24? O_o

EDIT: Evil is involved: 5+6+7+8+16+24=66
I think 5,6,7 and 8 are for the diagonal directions.
Come to think of it, it is! XD
Sig wipe!

Offline Xeda112358

  • they/them
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Grammer
« Reply #220 on: October 19, 2011, 03:25:15 pm »
Hmm, now there is an interesting idea... I haven't programmed that in, but I think I could make some special key combinations register... So the diagonal directions are a given, but what should I do for 16 and 24?

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Grammer
« Reply #221 on: October 19, 2011, 03:32:02 pm »
16=Detects I/0 port
24=Detects USB port(84 only)

Are you gonna eventually add sound as well?
Sig wipe!

Offline Xeda112358

  • they/them
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Grammer
« Reply #222 on: October 19, 2011, 03:35:28 pm »
Erm, I meant key presses...
And sound... hmm, I could implement some unofficial sound routines. Which tokens should be used?

(I say unofficial because they will need to be modified a bit and won't remain backwards compatible, probably)

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Grammer
« Reply #223 on: October 19, 2011, 03:36:26 pm »
Erm, I meant key presses...
And sound... hmm, I could implement some unofficial sound routines. Which tokens should be used?

(I say unofficial because they will need to be modified a bit and won't remain backwards compatible, probably)
I know but it would be cool like
getKey(16) returns the value of 1 when I/O port have something connected
Sig wipe!

Offline Xeda112358

  • they/them
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Grammer
« Reply #224 on: October 19, 2011, 03:39:02 pm »
But that would mean that keys don't register if something like headphones are in the I/O port ... :/