Author Topic: Axe Q&A  (Read 587266 times)

0 Members and 3 Guests are viewing this topic.

Offline C0deH4cker

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 258
  • Rating: +11/-1
    • View Profile
    • iNinjas Forum/Repo
Re: Axe Q&A
« Reply #945 on: November 09, 2011, 03:46:42 pm »
Quigbo: any reason that you did {A}+1->A instead of A++? Also, can you explain the 2nd arg of (r6)() to me: {A+L3-L6}

Nvm, figured it out. A is already pointing to L6 + the current offset, so you subtract L6 to get the offset, then add L3 to make the expression return a pointer to the offset within L3.
« Last Edit: November 09, 2011, 03:49:26 pm by C0deH4cker »

Offline parserp

  • Hero Extraordinaire
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1455
  • Rating: +88/-7
  • The King Has Returned
    • View Profile
Re: Axe Q&A
« Reply #946 on: November 09, 2011, 07:22:27 pm »
quick question: is {L1} a 1 or 2 bye integer?

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: Axe Q&A
« Reply #947 on: November 09, 2011, 07:45:17 pm »
{L1} is one byte.
{L1}r is two bytes.
;)
Vy'o'us pleorsdti thl'e gjaemue

Offline BlakPilar

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 734
  • Rating: +44/-1
    • View Profile
Re: Axe Q&A
« Reply #948 on: November 09, 2011, 09:19:59 pm »
I've finally taken the time to learn Axe lol. My main problem, right now, is with arrays. Can they have their dimensions modified like in BASIC? E.g. go from 10 to 15 to 7? And how do I get the length of the array?

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Axe Q&A
« Reply #949 on: November 09, 2011, 09:31:55 pm »
There is currently no native support for arrays -- you have to create your own format for them.




Offline BlakPilar

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 734
  • Rating: +44/-1
    • View Profile
Re: Axe Q&A
« Reply #950 on: November 09, 2011, 10:07:43 pm »
Darn... So there's no way to store the data other than the Data( command?

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: Axe Q&A
« Reply #951 on: November 09, 2011, 10:09:07 pm »
I think arrays are planned (?) but atm you have to do it yourself.
Data() is one way, you could also Fill() to a L# (or a GDB you declare beforehand) or use a for() loop and store number-for-number :D
« Last Edit: November 09, 2011, 10:09:35 pm by Darl181 »
Vy'o'us pleorsdti thl'e gjaemue

Offline BlakPilar

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 734
  • Rating: +44/-1
    • View Profile
Re: Axe Q&A
« Reply #952 on: November 09, 2011, 10:19:47 pm »
Alright :/ I'll try to work around that and see what I can do. Thanks, though.

Offline mrmprog

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 559
  • Rating: +35/-1
    • View Profile
Re: Axe Q&A
« Reply #953 on: November 09, 2011, 10:21:17 pm »
It is not as hard as it seems. I finished my first thing with arrays today :) I believe the Axe docs had something to say about how to use them.
« Last Edit: November 09, 2011, 10:21:27 pm by mrmprog »

Offline BlakPilar

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 734
  • Rating: +44/-1
    • View Profile
Re: Axe Q&A
« Reply #954 on: November 09, 2011, 10:22:26 pm »
I know how to use them :P lol. I just wasn't sure if their dimensions could be modified. (Like 5->dim(L1) in BASIC)
« Last Edit: November 09, 2011, 10:22:55 pm by BlakPilar »

Offline chattahippie

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 358
  • Rating: +27/-0
  • Super Member! :D
    • View Profile
Re: Axe Q&A
« Reply #955 on: November 09, 2011, 10:23:31 pm »
I know how to use them :P lol. I just wasn't sure if their dimensions could be modified. (Like 5->dim(L1) in BASIC)
If you modify them yourself (recode your array)

Offline BlakPilar

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 734
  • Rating: +44/-1
    • View Profile
Re: Axe Q&A
« Reply #956 on: November 09, 2011, 10:39:19 pm »
I know how to use them :P lol. I just wasn't sure if their dimensions could be modified. (Like 5->dim(L1) in BASIC)
If you modify them yourself (recode your array)
I know, that's been answered. I'm very much against hard-coding, though, so I don't want to keep doing that. I don't really plan any major projects in Axe anyway (I'm not really into calculator programming anymore), I just had some misc. programs I was playing around with.
« Last Edit: November 09, 2011, 10:40:33 pm by BlakPilar »

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Axe Q&A
« Reply #957 on: November 10, 2011, 05:04:24 pm »
How would you end the program inside a subroutine instead of it returning?

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: Axe Q&A
« Reply #958 on: November 10, 2011, 05:07:14 pm »
I believe there is a Returnr that does that. You'll want to check, though.
Do be sure that that is necessary, though. There's not often a need to forcibly terminate a program in the middle, and it can skip rather important clean-up code. Returnr's main use ought to be a last-measure force quit, or for debugging.
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Axe Q&A
« Reply #959 on: November 10, 2011, 06:22:58 pm »
My main loop is in a subroutine, and I wanted to push clear to save and quit. I guess I might just have it return to the menu.
« Last Edit: November 10, 2011, 06:24:55 pm by epic7 »