Author Topic: How to make axe program stores/loads from external var?  (Read 4185 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
How to make axe program stores/loads from external var?
« on: September 10, 2011, 05:32:56 pm »
Is it possible to write a program that takes a variable A from actual calc and store it to var A in calc?
EDIT: If it's possible, how do I do it?
« Last Edit: September 10, 2011, 05:33:12 pm by yeongJIN_COOL »
Sig wipe!

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: How to make axe program stores/loads from external var?
« Reply #1 on: September 10, 2011, 05:35:39 pm »
You mean, like the TIOS vars A-Z, that basic uses?  I think it's 2nd+7 (the u), then the letter.  It shows it that way in the documentation at least.
EDIT:
Quote from: Documentation.pdf
"prgmABC"
"appvABC"
"grpABC"
"LABC"
"L1"
"varA"
"Str1"
"GDB1"
"Y1"
"[A]"
"Ans"
The Program ABC
The Appvar ABC
The Group ABC (Archive Only)
The List ABC
The List L1
The Real number A
The String Str1
The Graph database GDB1
The Equation Y1
The Matrix [A]
The Ans variable
« Last Edit: September 10, 2011, 05:37:54 pm by Darl181 »
Vy'o'us pleorsdti thl'e gjaemue

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: How to make axe program stores/loads from external var?
« Reply #2 on: September 10, 2011, 05:37:16 pm »
so I do AxeVar -> (whatever the u was)A?
Sig wipe!

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: How to make axe program stores/loads from external var?
« Reply #3 on: September 10, 2011, 05:39:32 pm »
It seems so.  I think you have to Getcalc() it first, tho.
Vy'o'us pleorsdti thl'e gjaemue

Offline FinaleTI

  • Believe in the pony that believes in you!
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1830
  • Rating: +121/-2
  • Believe in the pony that believes in you!
    • View Profile
    • dmuckerman.tumblr.com
Re: How to make axe program stores/loads from external var?
« Reply #4 on: September 10, 2011, 05:40:49 pm »
You would need to do:
Code: [Select]
GetCalc("varA")->P
A->float{P}

Real vars are covered in my external vars tutorial.


Spoiler For Projects:

My projects haven't been worked on in a while, so they're all on hiatus for the time being. I do hope to eventually return to them in some form or another...

Spoiler For Pokemon TI:
Axe port of Pokemon Red/Blue to the 83+/84+ family. On hold.

Spoiler For Nostalgia:
My big personal project, an original RPG about dimensional travel and a few heroes tasked with saving the world.
Coding-wise, on hold, but I am re-working the story.

Spoiler For Finale's Super Insane Tunnel Pack of Doom:
I will be combining Blur and Collision Course into a single gamepack. On hold.

Spoiler For Nostalgia Origins: Sky's Story:
Prequel to Nostalgia. On hold, especially while the story is re-worked.

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: How to make axe program stores/loads from external var?
« Reply #5 on: September 10, 2011, 05:42:58 pm »
Oh thanks XD
I asked you that because I can't do anything else while running DSC7 curser routine, so I was trying to create my own.
Sig wipe!

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: How to make axe program stores/loads from external var?
« Reply #6 on: September 10, 2011, 05:44:55 pm »
You should always have error handling code when dealing with OS variable reading/creating. Here are routines for both directions, with error handling.


OS float to Axe variable:

Code: [Select]
If GetCalc("varA")  .var is the u token found at 2nd+7
float{}→A           .float{ is the fPart( token
Else
.Not found
End

Axe variable to OS float:

Code: [Select]
A→float{GetCalc("varA",7)}
!If  and 0
.Not enough RAM
End
« Last Edit: September 10, 2011, 05:45:35 pm by Runer112 »

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: How to make axe program stores/loads from external var?
« Reply #7 on: September 10, 2011, 05:46:00 pm »
Thanks for info XD
*Yeong copies thoes down to notepad so he can print and type it in later
Sig wipe!