• Axe Q&A 5 5
Currently:  

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

0 Members and 1 Guest are viewing this topic.

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Axe Q&A
« Reply #765 on: October 17, 2011, 07:26:04 pm »
After storing some values in Pointer, is there a way to "DelVar" it?
Every time I run the program, the Pointer still have all the values.
That is both a strength and weakness of shell programs. A strength because you don't have to create an appvar for save games, a weakness because you can't keep the original data for the next run if you modified it.
So there is no way to clear it?
trying to overwrite with Data(0,0,0,0,0,.... didn't work
Sig wipe!

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Axe Q&A
« Reply #766 on: October 17, 2011, 07:28:05 pm »
If you have data like so:

Data(0,0,0)->GDB1

and you modify this data durring the program, but you ALWAYS want it to start out as zero, you can zero the entire thing like so:

0->{GDB1}
Fill(GDB1,Length)

Offline Freyaday

  • The One And Only Serial Time Killing Catboy-Capoeirista-Ballerino
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1970
  • Rating: +128/-15
  • I put on my robe and pixel hat...
    • View Profile
Re: Axe Q&A
« Reply #767 on: October 17, 2011, 07:28:41 pm »
That's because Data() is basically Buff(), but you get control over the contents.
In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


I'm a performer at heart; I stole it last week.
My Artwork!

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Axe Q&A
« Reply #768 on: October 17, 2011, 07:31:56 pm »
ah, thank you!
@Frey: that was probably what caused the ported game to not work after 1st time playing :D
Sig wipe!

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 #769 on: October 17, 2011, 07:32:53 pm »
Buff() is basically a shortcut for Data()/[].




Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: Axe Q&A
« Reply #770 on: October 18, 2011, 10:39:01 pm »
Okay, I'm sure that this is just stupidity on my part, but I just can't see a bug in this.

Axe 1.0.5

Code: [Select]
.ZA

Text(0,0,F(5,6)>Dec)
Text(50,0,F(6,5)>Dec)

Text(0,10,F((6-1),(6+1))>Dec)
Text(50,10,F(6,6)-1>Dec)

Text(0,20,F(6,(5+4))>Dec)

Text(50,20,F(6,5)+F(6,4)>Dec)


Pause 5000

Lbl F
r1*r2+r1+r2
Return

Compiling halts at 57% during the first pass -- error message: "WRONG # OF ARGS".

Pressing [pgrm] jumps to the sixth 'Text'
Code: [Select]
Text(50,20,F(6,5)+F(6,4)>Dec)
                     ^

(In case anybody was wondering, I was brute-forcing a solution to an SAT problem (in my defense, I was feeling too tired to be clever)).
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axe Q&A
« Reply #771 on: October 18, 2011, 11:01:50 pm »
Pick that post back up and take it right on over to the bug reports thread, because that's definitely Axe's fault, not yours. It's treating +F as adding the variable F instead of noticing the opening parenthesis immediately following it and treating it as adding the return value of a function.

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: Axe Q&A
« Reply #772 on: October 18, 2011, 11:12:00 pm »
Okay, thanks.
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Axe Q&A
« Reply #773 on: October 18, 2011, 11:13:45 pm »
Question:what is the limit of constant's letter? I know that it must be more than 1 letter... Also, can I store decimal in constant?
Sig wipe!

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Axe Q&A
« Reply #774 on: October 19, 2011, 08:32:35 pm »
discard the question before:
Why doesn't this code work?
Code: [Select]
:.MPREV
:GetCalc("varF")->A
:GetCalc("varP")->B
:float{A}->F
:float{B}->P
:F->oAA      //o is a degree sign
:P->oBB
:freq(oAA,oBB
:Return
It compiles, but it won't produce sound.
(In my case, OS varF was 314 and OS varP was 32796)
« Last Edit: October 19, 2011, 08:32:53 pm by yeongJIN_COOL »
Sig wipe!

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Axe Q&A
« Reply #775 on: October 19, 2011, 08:47:46 pm »
That shouldn't compile so I guess its a bug then.  You can't assign a variable to a constant because, by definition, constants cannot change value throughout the life of the program.
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Axe Q&A
« Reply #776 on: October 19, 2011, 10:44:15 pm »
Oops.Wrong code XP
It should've been
Code: [Select]
:.MPREV
:GetCalc("varF")->A
:GetCalc("varP")->B
:float{A}->F
:float{B}->P
:freq(F,P
:Return
Sig wipe!

Offline NecroBumpist

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 130
  • Rating: +14/-5
  • Master of Lua
    • View Profile
Re: Axe Q&A
« Reply #777 on: October 19, 2011, 10:49:15 pm »
I'm curious as to what else you plan to implement, Quigibo. Just how much more can you possibly add to Axe :P ?
Developing Lua scripts for the NSpire ?
Check out the Necrotorium
Need a few routines to run faster ? Checkout the MODS Lua Assembly Toolkit.
Need to save space for your scripts ? Checkout LuaSrcDiet

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 #778 on: October 19, 2011, 11:08:44 pm »
Objects, data typing, webserver scripting, BrainF*ck-style syntax, butterfly support.
* Deep Thought runs
« Last Edit: October 19, 2011, 11:08:57 pm by Deep Thought »




Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Axe Q&A
« Reply #779 on: October 19, 2011, 11:09:47 pm »
Auto dissembling into z80 source files
*Yeong follows Deep Thought
Sig wipe!