Author Topic: How does one make an Axe Library, in Axe.  (Read 13759 times)

0 Members and 1 Guest are viewing this topic.

Offline josh landers

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 116
  • Rating: +1/-0
    • View Profile
Re: How does one make an Axe Library, in Axe.
« Reply #15 on: April 15, 2014, 12:55:06 pm »
prgmLIB should be at the bottom of your source. Don't put a return in the end of it, but in the beginning. Also it should start with "..", not ".", although that's not the problem.
Ok but what if I wanted to relese it?

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: How does one make an Axe Library, in Axe.
« Reply #16 on: April 15, 2014, 12:56:33 pm »
If you want to release it you just give people the 8xp of your library and they can use it in the same way. ;)

Offline josh landers

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 116
  • Rating: +1/-0
    • View Profile
Re: How does one make an Axe Library, in Axe.
« Reply #17 on: April 15, 2014, 09:21:23 pm »
Yah 100th post!
I also got some of it to work. Hoping to show and tell tommorrow!

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: How does one make an Axe Library, in Axe.
« Reply #18 on: April 16, 2014, 05:55:56 am »
Nice to hear. Good luck for finishing it. :)

Offline josh landers

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 116
  • Rating: +1/-0
    • View Profile
Re: How does one make an Axe Library, in Axe.
« Reply #19 on: April 16, 2014, 12:43:00 pm »
I am on the finishing touches!
When saving to an appvar, and storing a string. how does one pull the string back out to display it?

Offline TheMachine02

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 452
  • Rating: +105/-0
  • me = EF99+F41A
    • View Profile
Re: How does one make an Axe Library, in Axe.
« Reply #20 on: April 16, 2014, 12:58:03 pm »
If you have stored your string at the begining of the appv (with a copy for example), then you can use the pointer to the appv as a pointer to the string. Just remember that you have to store the 0 of the end of the string.
You can do for example, if the string "TOTO" + the 0 is stored in the appv TEST :
 
Code: [Select]
Getcalc("appvTEST")->P
Disp P

and it will display the string stored.
 
AXE/asm programmer - unleash the power of z80 //C++//C

epic 3D things http://www.ntu.edu.sg/home/ehchua/programming/opengl/CG_BasicsTheory.html

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: How does one make an Axe Library, in Axe.
« Reply #21 on: April 16, 2014, 01:03:22 pm »

Offline josh landers

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 116
  • Rating: +1/-0
    • View Profile
Re: How does one make an Axe Library, in Axe.
« Reply #22 on: April 16, 2014, 04:09:55 pm »
UPDATE :D


YAY!
Quote from: SourceCoder 3 (LIBRARY)
:.FILELIB
:...
:DO NOT COMPILE AND RUN!
:BAD THINGS WILL HAPPEN
:...
:Return
:.FSM("appvStr4",SIZE)
:Lbl FSM
:!If GetCalc([r1])->Θ
:GetCalc([r1],[r2])->theta
:End
:[r1]->{Θ}^^r
:[r2]->{Θ+length([r1])+1}^^r
:Return
:.FLL(filenum,"name","size")
:Lbl FLL
:If [r1]=1
:[r2]->{Θ+30}
:[r3]->{Θ+46}
:End
:If [r1]=2
:[r2]->{Θ+61}
:[r3]->{Θ+77}
:End
:If [r1]=3
:[r2]->{Θ+92}
:[r3]->{Θ+108}
:End
:If [r1]=4
:[r2]->{Θ+123}
:[r3]->{Θ+139}
:End
:If [r1]=5
:[r2]->{Θ+154}
:[r3]->{Θ+169}
:End
:If [r1]=6
:[r2]->{Θ+185}
:[r3]->{Θ+200}
:End
:Return
:.FKL()
:Lbl FKL
:DelVar Θ
:Return
:
:Lbl FBN
:!If GetCalc([r1])->[r2]
:GetCalc([r1],768)->[r2]
:End:SortD(Θ,768)
:Copy(Θ,[r2],768)^^r
:Return
:.FCL(byteSTRT,length(bytes))
:Lbl FCL
:For([r4],0,[r2])
:[r3]->{Θ+([r1]+[r4])}
:End
:Return
:
:Lbl FAR
:Archive Θ
:Return
If anyone can help me dubug this that would be nice...Please excuse the strange syntax.
« Last Edit: April 19, 2014, 03:33:10 pm by josh landers »

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: How does one make an Axe Library, in Axe.
« Reply #23 on: April 16, 2014, 06:08:11 pm »
Ok so if anyone can help make sense of this that would be great!


... Didn't you write it? I don't understand why you're asking others to help you make sense of code that you authored. Unless you mean for others to help you debug it, in which case I see multiple things that are potentially errors, but I'm not really sure without knowing what any of this is supposed to do.
« Last Edit: April 16, 2014, 06:09:58 pm by Runer112 »

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: How does one make an Axe Library, in Axe.
« Reply #24 on: April 16, 2014, 06:25:42 pm »
Well as I said since it's not meant to be compiled alone, it should start with two dots.

Offline josh landers

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 116
  • Rating: +1/-0
    • View Profile
Re: How does one make an Axe Library, in Axe.
« Reply #25 on: April 16, 2014, 08:20:30 pm »
Ok so if anyone can help make sense of this that would be great!


... Didn't you write it? I don't understand why you're asking others to help you make sense of code that you authored. Unless you mean for others to help you debug it, in which case I see multiple things that are potentially errors, but I'm not really sure without knowing what any of this is supposed to do.
Partially debug, and also explain the appvar usages in it.
Yes I did author this code. But I used very limited knowledge.
Here is the original idea.
    A library that can help the programmer create a screen of information. The information is stored in an appvar. You can use this like a directory command, or as a game scores list. The end use is arbitrary.  There are three main commands.
FSM ( "appvDIRN", size )
will make a directory.
FLL ( #, name, size)
# is from 1- 6, the lib uses this to place up to six files.
Name should be a string
Size, an arbitrary value. It could be a level or score etc.
FPR ()
UNDER CONSTRUCTION
The other commands are
FBN (String OS VAR)
will make an output file of the appvar and I use pic, but you can also use prgm
FKL ()
Suppose to delete it,  doesnt work
FCL (START, LENGTH, constant)
Will fill a portion of the appvar with constant.
FAR ()
Archive the appvar



Hope this helps!

Offline alberthrocks

  • Moderator
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 876
  • Rating: +103/-10
    • View Profile
Re: How does one make an Axe Library, in Axe.
« Reply #26 on: April 16, 2014, 10:24:39 pm »
Ok so if anyone can help make sense of this that would be great!
Woah, you wrote this code and don't know what it does? And you want us to figure it out? Yikes!

It's great to have people collaborating on code, but we really can't write or debug code for you. Maybe snippets of code (3-6 lines), sure. But we can't do your whole project! (In fact, if your "snippets of code" compounds to your entire project, that's bad too!) You have to understand that everyone is busy - we'd love to help with programming questions, but you can't just dump code here and expect us to critique it.  ;) Before asking any questions, we want to see that you've done a bare minimum research into the questions you'd like to ask, and the APIs you're asking about. If you have looked everywhere - Google, Omnimaga forums, Axe documentation, etc. - then we are more receptive to helping you out! :D

So my challenge to you: what's wrong with your code? How can it be made better? What don't you understand about it, and how can you fix that? Spend at least 5 hours pondering on that, without any distractions, interruptions, or delays. If within that time, you've consulted every resource available, and you've put forth your best, good faith effort into solving this, and are sweating/head-desking over the issues with your code after 5 hours of heavy research and problem solving, come back to us for questions! If you still have questions then, I promise you that the stuff you'll be asking us will be great! ;)
Withgusto Networks Founder and Administrator
Main Server Status: http://withg.org/status/
Backup Server Status: Not available
Backup 2/MC Server Status: http://mc.withg.org/status/


Proud member of ClrHome!

Miss my old signature? Here it is!
Spoiler For Signature:
Alternate "New" IRC post notification bot (Newy) down? Go here to reset it! http://withg.org/albert/cpuhero/

Withgusto Networks Founder and Administrator
Main Server Status: http://withg.org/status/
Backup Server Status: Not available
Backup 2/MC Server Status: http://mc.withg.org/status/

Activity remains limited due to busyness from school et al. Sorry! :( Feel free to PM, email, or if you know me well enough, FB me if you have a question/concern. :)

Don't expect me to be online 24/7 until summer. Contact me via FB if you feel it's urgent.


Proud member of ClrHome!

Spoiler For "My Projects! :D":
Projects:

Computer/Web/IRC Projects:
C______c: 0% done (Doing planning and trying to not forget it :P)
A_____m: 40% done (Need to develop a sophisticated process queue, and a pretty web GUI)
AtomBot v3.0: 0% done (Planning stage, may do a litmus test of developer wants in the future)
IdeaFrenzy: 0% done (Planning and trying to not forget it :P)
wxWabbitemu: 40% done (NEED MOAR FEATURES :P)

Calculator Projects:
M__ C_____ (an A____ _____ clone): 0% done (Need to figure out physics and Axe)
C2I: 0% done (planning, checking the demand for it, and dreaming :P)

Offline josh landers

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 116
  • Rating: +1/-0
    • View Profile
Re: How does one make an Axe Library, in Axe.
« Reply #27 on: April 17, 2014, 12:55:19 pm »
Ok so if anyone can help make sense of this that would be great!
Woah, you wrote this code and don't know what it does? And you want us to figure it out? Yikes!
...
Before asking any questions, we want to see that you've done a bare minimum research into the questions you'd like to ask, and the APIs you're asking about....

Spend at least 5 hours pondering on that, without any distractions, interruptions, or delays. If within that time, you've consulted every resource available, and you've put forth your best, good faith effort into solving this, and are sweating/head-desking over the issues with your code after 5 hours of heavy research and problem solving, come back to us for questions! ...


Your putting words in my mouth, I wrote the code, I have now worked on this for 18 and I dont think its too much to ask for people to look at a post, see a major flaw (or even a minor one) comment on it and explain.


No I will not spend five hours of my day questioning what I wrote. Look at the post above yours and you will see that i cleared up the confusion about what it does.
  But I used very limited knowledge.
This is my point, I used to scrapes of information I was given and came up with something that works but I don't know how the appvar works, and still do not. I need some more information about why i cant pull the information back out. Was it put in wrong etc.?

Offline alberthrocks

  • Moderator
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 876
  • Rating: +103/-10
    • View Profile
Re: How does one make an Axe Library, in Axe.
« Reply #28 on: April 17, 2014, 01:33:47 pm »
Your putting words in my mouth, I wrote the code, I have now worked on this for 18 and I dont think its too much to ask for people to look at a post, see a major flaw (or even a minor one) comment on it and explain.
"if anyone can help make sense of this" is basically asking us to figure out what you wrote. That's kinda like blindly writing a letter in Arabic and asking someone to decipher it...
From my experience with coding (and pretty much everyone else's), the person who wrote the code knows it best. If you don't know what you wrote, then who else will?


This is my point, I used to scrapes of information I was given and came up with something that works but I don't know how the appvar works, and still do not. I need some more information about why i cant pull the information back out. Was it put in wrong etc.?
I'm trying to say that you didn't put enough effort. Did you read the forums? Did you read the Axe documentation? Did you test it out yourself? I know you definitely didn't do the first two because you really didn't do the last one at all! From some very little experience with Axe, the code looks really wrong to me. Compiling this would not be too pretty. Which leads me to this...


No I will not spend five hours of my day questioning what I wrote. Look at the post above yours and you will see that i cleared up the confusion about what it does.
18 hours? More like 18 seconds or something! ;) Please, please take some time to actually learn Axe. We're not here to teach you Axe. We're here to help you learn Axe. There's a difference: teaching is to actively teach you Axe, while learning is a student and teacher thing. In essence, you must put in effort to learn Axe so that we can help you learn. It's kinda like going to school - the teacher can teach you, but you will only learn if you do your homework! (This is very true, especially in college!) If you learn it, I promise that you will come out knowing Axe much, much better than before! :)

We want to help you. But you must show us that you at least took some time and effort to make your code good so that we can help you better! :D
« Last Edit: April 17, 2014, 01:37:25 pm by alberthrocks »
Withgusto Networks Founder and Administrator
Main Server Status: http://withg.org/status/
Backup Server Status: Not available
Backup 2/MC Server Status: http://mc.withg.org/status/


Proud member of ClrHome!

Miss my old signature? Here it is!
Spoiler For Signature:
Alternate "New" IRC post notification bot (Newy) down? Go here to reset it! http://withg.org/albert/cpuhero/

Withgusto Networks Founder and Administrator
Main Server Status: http://withg.org/status/
Backup Server Status: Not available
Backup 2/MC Server Status: http://mc.withg.org/status/

Activity remains limited due to busyness from school et al. Sorry! :( Feel free to PM, email, or if you know me well enough, FB me if you have a question/concern. :)

Don't expect me to be online 24/7 until summer. Contact me via FB if you feel it's urgent.


Proud member of ClrHome!

Spoiler For "My Projects! :D":
Projects:

Computer/Web/IRC Projects:
C______c: 0% done (Doing planning and trying to not forget it :P)
A_____m: 40% done (Need to develop a sophisticated process queue, and a pretty web GUI)
AtomBot v3.0: 0% done (Planning stage, may do a litmus test of developer wants in the future)
IdeaFrenzy: 0% done (Planning and trying to not forget it :P)
wxWabbitemu: 40% done (NEED MOAR FEATURES :P)

Calculator Projects:
M__ C_____ (an A____ _____ clone): 0% done (Need to figure out physics and Axe)
C2I: 0% done (planning, checking the demand for it, and dreaming :P)

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: How does one make an Axe Library, in Axe.
« Reply #29 on: April 17, 2014, 01:49:17 pm »
Most if not all of my Axe knowledge is self taught using the documentation or borrowed from other people's ideas I randomly found. You should try that, it'll get you to a very good level. ;)