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

0 Members and 7 Guests are viewing this topic.

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 #420 on: May 27, 2011, 10:41:37 pm »
Can I do {byte}->VAR, or does it have to be two bytes?
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 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 #421 on: May 27, 2011, 10:44:08 pm »
That works.  It will automatically make the high byte zero so you'll get the range you're looking for (0 to 255).  That is, unless that's a signed byte, then you can use sign{byte}->VAR to get the -128 to 127 range.
___Axe_Parser___
Today the calculator, tomorrow the world!

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 #422 on: May 27, 2011, 11:09:57 pm »
Can I do
{byte}>number?
And can I do
{byte}+n>m?
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 Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Axe Q&A
« Reply #423 on: May 28, 2011, 06:19:56 am »
Freyaday, I'm not sure but I think you have to do

{Byte+N}→M
« Last Edit: May 28, 2011, 06:26:33 am by Scout »

Offline Aichi

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 290
  • Rating: +76/-3
    • View Profile
    • Devrays
Re: Axe Q&A
« Reply #424 on: May 28, 2011, 06:28:02 am »
Can I do
{byte}>number?
And can I do
{byte}+n>m?

Both constructions are possible. Note: m<{byte}+n would always return not zero, since it will be processed from left to right.

Edit @ Scout:

I think Freyaday means ">", not "->". Also, both {Byte}+N->M and {Byte+N}->M are possible, but they make for different results.
« Last Edit: May 28, 2011, 06:33:36 am by Aichi »

Offline ZippyDee

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 729
  • Rating: +83/-8
  • Why not zoidberg?
    • View Profile
Re: Axe Q&A
« Reply #425 on: May 28, 2011, 06:32:51 am »
Can I do
{byte}>number?
And can I do
{byte}+n>m?

Both constructions are possible. Note: m<{byte}+n would always return not zero, since it will be processed from left to right.

Unless N is zero...
There's something about Tuesday...


Pushpins 'n' stuff...


Offline Aichi

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 290
  • Rating: +76/-3
    • View Profile
    • Devrays
Re: Axe Q&A
« Reply #426 on: May 28, 2011, 06:46:09 am »
Can I do
{byte}>number?
And can I do
{byte}+n>m?

Both constructions are possible. Note: m<{byte}+n would always return not zero, since it will be processed from left to right.

Unless N is zero...

Yeah unless N is zero and M is higher than {Byte}.
...Or M is lower than / equal to {Byte} and N is 65535. :P
« Last Edit: May 28, 2011, 06:47:41 am by Aichi »

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 #427 on: May 28, 2011, 09:47:19 am »
Can I do {byte}->VAR, or does it have to be two bytes?

If you're still talking about size bytes, it's {P-2}r→M, where P is the pointer to the var as found by GetCalc(.




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 #428 on: May 28, 2011, 10:39:29 am »
Aichi had the answer I was looking for. Thanks guys!
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 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 #429 on: May 30, 2011, 05:04:37 pm »
The nice thing about Java is that because almost everything is a pointer (primitives aren't), you don't need both.:)

But you can't hack them since you can't actually use the pointer yourself ;)




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 #430 on: May 30, 2011, 09:22:34 pm »
Does using Zeros() increase the size of the program, or is the blank space not part the executable?
Vy'o'us pleorsdti thl'e gjaemue

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 #431 on: May 30, 2011, 09:26:59 pm »
If Quigibo adds the fourth pass, data will be put at the end of the program, after all the code, so you don't have to worry about it contributing to your 8811-byte limit. Zeros( is exactly the same as doing [0000 ... ].




Offline selectcoaxial

  • LV2 Member (Next: 40)
  • **
  • Posts: 29
  • Rating: +0/-0
    • View Profile
Change value of an appvar
« Reply #432 on: June 01, 2011, 07:19:45 am »
Hi, I'm really new to this. I'm trying to change the value of an appvar from another program. The appvar already exists and was created by another program, it is currently placed in Archive. So this is what I've been doing:

Code: [Select]
.CHANGE VALUE OF APPVAR
"appvTest"→Str9
UnArchive Str9
GetCalc(Str9)→P
3000→S
If P
 If S>{P}r
  S→{P}r
 End
End

Then I compiled this for MirageOS. After selected and ran the program, I went into the original program that created appvTest and see whether the appvar has changed, and it still has the same value. Can you help me, please? Thank you.

Offline Aichi

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 290
  • Rating: +76/-3
    • View Profile
    • Devrays
Re: Axe Q&A
« Reply #433 on: June 01, 2011, 07:45:55 am »
Hi, I'm really new to this. I'm trying to change the value of an appvar from another program. The appvar already exists and was created by another program, it is currently placed in Archive. So this is what I've been doing:

Code: [Select]
.CHANGE VALUE OF APPVAR
"appvTest"→Str9
UnArchive Str9
GetCalc(Str9)→P
3000→S
If P
 If S>{P}r
  S→{P}r
 End
End

Then I compiled this for MirageOS. After selected and ran the program, I went into the original program that created appvTest and see whether the appvar has changed, and it still has the same value. Can you help me, please? Thank you.

Do you use the appv Token? And welcome here. :)
Edit: It works for me.
« Last Edit: June 01, 2011, 08:09:23 am by Aichi »

Offline selectcoaxial

  • LV2 Member (Next: 40)
  • **
  • Posts: 29
  • Rating: +0/-0
    • View Profile
Re: Axe Q&A
« Reply #434 on: June 01, 2011, 08:09:05 am »
I used  [2nd] [9] for the "v" in "appv" but I used lower cases for "app" because I didn't know where they are.

Edit: Sorry, I just re-read the documentation, and I found the token.
« Last Edit: June 01, 2011, 08:15:00 am by selectcoaxial »