Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
23 May, 2013, 17:03:21 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: 1 ... 97 98 [99] 100 101 ... 110   Go Down
  Print  
Author Topic: Axe Q&A -  (Read 59480 times) Bookmark and Share
0 Members and 2 Guests are viewing this topic.
Hayleia
Programming Absol
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Last Login: Today at 07:16:27
Date Registered: 01 June, 2011, 20:12:47
Location: ud-ud ?
Posts: 2054


Total Post Ratings: +256

View Profile
« Reply #1470 on: 22 April, 2012, 16:48:26 »
0

When I say {L1+200+A}, is L1+200 calculated when parsing or when executing ?
Logged





Spoiler for what I am according to...:
me: useless
Pokemon Test: an Absol
turiqwalrus: an eggplant
p2: A HUMAN BEING !
Blackpilar and p2: iplantonlyplantwantplanttoplantknowplantifplantyouplantareplantaplantboyplantorplantaplantgirlplant
click here to know where you got your last +1s
Deep Thought
So much to do, so much time, so little motivation
Administrator
LV13 Extreme Addict (Next: 9001)
*
Offline Offline

Gender: Male
Last Login: Today at 03:56:01
Date Registered: 19 May, 2009, 08:00:00
Location: The Universe
Posts: 7813


Total Post Ratings: +706

View Profile WWW
« Reply #1471 on: 22 April, 2012, 17:38:06 »
0

Axe calculates it when compiling. (You can optimize it more as {A+L1+200}, by the way. Always put constants after.)
« Last Edit: 22 April, 2012, 17:38:14 by Deep Thought » Logged




Hayleia
Programming Absol
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Last Login: Today at 07:16:27
Date Registered: 01 June, 2011, 20:12:47
Location: ud-ud ?
Posts: 2054


Total Post Ratings: +256

View Profile
« Reply #1472 on: 22 April, 2012, 17:40:15 »
0

Axe calculates it when compiling. (You can optimize it more as {A+L1+200}, by the way. Always put constants after.)
Ok thanks Smiley
(and for putting constants after, I do it for little pieces of code like A+3→A but I always forget it otherwise -.-°)
Logged





Spoiler for what I am according to...:
me: useless
Pokemon Test: an Absol
turiqwalrus: an eggplant
p2: A HUMAN BEING !
Blackpilar and p2: iplantonlyplantwantplanttoplantknowplantifplantyouplantareplantaplantboyplantorplantaplantgirlplant
click here to know where you got your last +1s
Hayleia
Programming Absol
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Last Login: Today at 07:16:27
Date Registered: 01 June, 2011, 20:12:47
Location: ud-ud ?
Posts: 2054


Total Post Ratings: +256

View Profile
« Reply #1473 on: 25 April, 2012, 08:34:12 »
0

Hayleia:
A and 1
A^2
Which one is the lightest/fastest ?



Runer112 (I don't remember exactly):
and 1 is smallest and fastest but doesn't touch the highest byte.



aeTIos:
What is the "and" equivalent of ^2 then ?


(That would be great if aeTIos and Runer112 posted their answers back Smiley (Moreover, I may have written wrong things))


Hayleia, edit

There is sub(LBL,arg) and sub(LBLr,arg).
There is LBL(arg). But is LBLr(arg) valid ??

How much space does calling "stdDev(PTR,N)" take ??
How much space does calling "sub(LBLr,arg)" take ??
« Last Edit: 25 April, 2012, 13:57:19 by Hayleia » Logged





Spoiler for what I am according to...:
me: useless
Pokemon Test: an Absol
turiqwalrus: an eggplant
p2: A HUMAN BEING !
Blackpilar and p2: iplantonlyplantwantplanttoplantknowplantifplantyouplantareplantaplantboyplantorplantaplantgirlplant
click here to know where you got your last +1s
Runer112
Anti-Riot Squad
LV10 31337 u53r (Next: 2000)
*
Offline Offline

Gender: Male
Last Login: Today at 06:53:04
Date Registered: 02 July, 2009, 06:38:05
Posts: 1680


Total Post Ratings: +493

View Profile
« Reply #1474 on: 26 April, 2012, 02:32:15 »
0

aeTIos:
What is the "and" equivalent of ^2 then ?

and 1 pretty much is the equivalent of ^2; and 2 just doesn't set the high byte to 0, and is thus 2 bytes smaller and 7 cycles faster. Or you could use the full 16-bit bitwise AND, ·1, which results in the exact same compiled code as ^2.

There is sub(LBL,arg) and sub(LBLr,arg).
There is LBL(arg). But is LBLr(arg) valid ??

I would imagine that LBL(args)r doesn't exist because parsing that would require look-ahead parsing to detect the r before the arguments are parsed, but LBLr(args) seems like it could be implemented. Not sure why it isn't yet.

How much space does calling "stdDev(PTR,N)" take ??
How much space does calling "sub(LBLr,arg)" take ??

Excluding PTR and N of course, the stdDev(PTR,N) call takes 4 bytes, plus 14 bytes for the routine itself.
Again excluding the arguments, sub(LBLr,args) takes a pretty substantial 12 bytes per argument, plus 3 bytes for the call. Unless you absolutely must have a recursive function, I suggest avoiding this, as this costs an extra 9 bytes per argument.
Logged
Hayleia
Programming Absol
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Last Login: Today at 07:16:27
Date Registered: 01 June, 2011, 20:12:47
Location: ud-ud ?
Posts: 2054


Total Post Ratings: +256

View Profile
« Reply #1475 on: 01 May, 2012, 17:28:15 »
0

Ok, new question Tongue

When I do
__________________________________

Text(0,0,"text")
...
some more code here
...
Text(0,6,"text")
.the same "text" word as before
__________________________________

Is "text" stored once in memory or twice ?
« Last Edit: 01 May, 2012, 17:28:52 by Hayleia » Logged





Spoiler for what I am according to...:
me: useless
Pokemon Test: an Absol
turiqwalrus: an eggplant
p2: A HUMAN BEING !
Blackpilar and p2: iplantonlyplantwantplanttoplantknowplantifplantyouplantareplantaplantboyplantorplantaplantgirlplant
click here to know where you got your last +1s
MGOS
LV5 Advanced (Next: 300)
*****
Online Online

Gender: Male
Last Login: Today at 16:35:23
Date Registered: 29 July, 2011, 16:54:53
Location: Germany
Posts: 296


Total Post Ratings: +74

View Profile
« Reply #1476 on: 01 May, 2012, 17:35:00 »
0

Twice (or as often you use it). To prevent that, you can do

1
2
3
4
5
6
"text"->str1
...
text(0,0,str1)
...
text(0,6,str1)
Logged

Click those to see more information Smiley
Current   
Projects: 
Hayleia
Programming Absol
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Last Login: Today at 07:16:27
Date Registered: 01 June, 2011, 20:12:47
Location: ud-ud ?
Posts: 2054


Total Post Ratings: +256

View Profile
« Reply #1477 on: 01 May, 2012, 18:46:14 »
0

Twice (or as often you use it). To prevent that, you can do

1
2
3
4
5
6
"text"->str1
...
text(0,0,str1)
...
text(0,6,str1)
I know how to prevent it, I am just lazy and wanted to know if I had to prevent it or no Tongue
Logged





Spoiler for what I am according to...:
me: useless
Pokemon Test: an Absol
turiqwalrus: an eggplant
p2: A HUMAN BEING !
Blackpilar and p2: iplantonlyplantwantplanttoplantknowplantifplantyouplantareplantaplantboyplantorplantaplantgirlplant
click here to know where you got your last +1s
Hayleia
Programming Absol
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Last Login: Today at 07:16:27
Date Registered: 01 June, 2011, 20:12:47
Location: ud-ud ?
Posts: 2054


Total Post Ratings: +256

View Profile
« Reply #1478 on: 03 May, 2012, 19:01:20 »
0

(double posting after a little while)

How do we end a conditionnal comment ? with "..." or "...End", like
   this   or this
   ...If CST   ...If CST
   code   code
   ...End   ...
?
« Last Edit: 03 May, 2012, 19:02:18 by Hayleia » Logged





Spoiler for what I am according to...:
me: useless
Pokemon Test: an Absol
turiqwalrus: an eggplant
p2: A HUMAN BEING !
Blackpilar and p2: iplantonlyplantwantplanttoplantknowplantifplantyouplantareplantaplantboyplantorplantaplantgirlplant
click here to know where you got your last +1s
kindermoumoute
LV8 Addict (Next: 1000)
********
Offline Offline

Last Login: 20 May, 2013, 23:02:59
Date Registered: 15 May, 2010, 17:53:56
Posts: 836


Total Post Ratings: +51

View Profile
« Reply #1479 on: 03 May, 2012, 20:44:09 »
0

If °CONST=83, Code1 is compiled, else Code2.

1
2
3
4
5
6
7
:83->°CONST
:
:...If °CONST=83
:.Code1
:...Else
:.Code2
:...End
Logged

Projects :

Worms armageddon z80 :
- smoothscrolling Pixelmapping : 100%
- Map editor : 80%
- Game System : 0%

Tutoriel français sur l'Axe Parser
- 1ère partie : en ligne.
- 2ème partie : en ligne.
- 3ème partie : en ligne.
- 4ème partie : 10%
- Annexe : 100%
Sorunome
Muffins
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: Today at 05:49:21
Date Registered: 26 September, 2011, 17:46:38
Location: Ponyville
Posts: 2945


Total Post Ratings: +161

View Profile WWW
« Reply #1480 on: 03 May, 2012, 20:56:02 »
0

What's the sense of using comment ifs?
I mean, you could just make it normal, I don't think it compiles different on other calcs....
Logged

http://z0r.de/4017
http://www.youtube.com/watch?v=BFOoazEx9lU
http://www.sorunome.de
http://reubenquest.net
+++++++[>++++++++++++<-]>.<+++[>----<-]>.---.<++++[>>++++++++<<-]>>.<++.------.++++++++++++.--------.

++++++[>++++++++++<-]>++++++++.<+++[>+++++++++++<-]>.+++++++++++++.--.<+++[>+++<-]>.<+++[>>++++++++++<<-]>>++.<<+++++++[>-------<-]>.<+++[>+++++++++++++<-]>..+++++++.<+++[>-----<-]>--.<++[>++++++<-]>++.

If OmnomIRC is screwed up, blame me Tongue

Save Derpy!(http://www.youtube.com/watch?v=cg-_HeVNYOk)
Spoiler for spoilers:


Spoiler for languages:
- TI-BASIC
 - TI-Highbrid Basic
 - Grammer
 - Axe
 - HTML
 - JavaScript
 - CSS
 - PHP
 - C++
 - lua
 - Python
 - MYSQL
 - Brainf*ck
 - English
 - German
Spoiler for internet:
/image/36691.png[/img]
Gimme internet NOW
Spoiler for me:
Spoiler for my little game:
my little game...my little game..aaaaaahhhhhh...my little game, i used to wonder how to lose the game, my little game, until you shared its losing with me. take the losing and the game, a beutiful game so losable, sharing losing is a easy sweat and losing makes it aweful neat to have my little game togeather with my very best games.
Spoiler for stuff:
Spoiler for derpy:



Hayleia
Programming Absol
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Last Login: Today at 07:16:27
Date Registered: 01 June, 2011, 20:12:47
Location: ud-ud ?
Posts: 2054


Total Post Ratings: +256

View Profile
« Reply #1481 on: 03 May, 2012, 20:56:33 »
0

I was just asking for the End, but thanks anyway Smiley
Logged





Spoiler for what I am according to...:
me: useless
Pokemon Test: an Absol
turiqwalrus: an eggplant
p2: A HUMAN BEING !
Blackpilar and p2: iplantonlyplantwantplanttoplantknowplantifplantyouplantareplantaplantboyplantorplantaplantgirlplant
click here to know where you got your last +1s
Runer112
Anti-Riot Squad
LV10 31337 u53r (Next: 2000)
*
Offline Offline

Gender: Male
Last Login: Today at 06:53:04
Date Registered: 02 July, 2009, 06:38:05
Posts: 1680


Total Post Ratings: +493

View Profile
« Reply #1482 on: 03 May, 2012, 22:49:07 »
0

If °CONST=83, Code1 is compiled, else Code2.

1
2
3
4
5
6
7
:83->°CONST
:
:...If °CONST=83
:.Code1
:...Else
:.Code2
:...End

If you tried to compile that, Axe would throw an error. Tongue There is no End to end conditional comments, you just end blocks like you would end any conditional comment:


1
2
3
4
5
6
:...If CONSTANT_EXPRESSION
:.Code goes here
:...Else
:.Other code goes here
:...





What's the sense of using comment ifs?
I mean, you could just make it normal, I don't think it compiles different on other calcs....

You are correct that the code doesn't compile differently on different calculator models on its own. But you can make it compile differently by changing the value of a constant, allowing you to quickly and easily change what code is compiled. This is useful for Axe libraries, creating multiple compiled variations of your program, and testing your programs, among other things. For instance, you could put blocks like this in your program:


1
2
3
4
5
6
...If °DEBUG
ClrHome
Disp A►Dec,i,B►Dec,i,C►Dec
getKeyʳ
...

And then simply change the value of the constant °DEBUG before compiling to allow you to turn debugging output on and off. The advantage over a normal If statement is that, if °DEBUG equals 0, the debugging code is not included in the compiled program, which is good if you have 500 bytes of debugging code and you don't want it bloating your official program release.
« Last Edit: 04 May, 2012, 07:01:39 by Runer112 » Logged
Hayleia
Programming Absol
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Last Login: Today at 07:16:27
Date Registered: 01 June, 2011, 20:12:47
Location: ud-ud ?
Posts: 2054


Total Post Ratings: +256

View Profile
« Reply #1483 on: 04 May, 2012, 06:57:46 »
0

There is no Else or End with conditional comments
Huh?
Commands.html says that "Else" is possible.
But thanks for telling me how to end those conditional comments Smiley
Logged





Spoiler for what I am according to...:
me: useless
Pokemon Test: an Absol
turiqwalrus: an eggplant
p2: A HUMAN BEING !
Blackpilar and p2: iplantonlyplantwantplanttoplantknowplantifplantyouplantareplantaplantboyplantorplantaplantgirlplant
click here to know where you got your last +1s
Runer112
Anti-Riot Squad
LV10 31337 u53r (Next: 2000)
*
Offline Offline

Gender: Male
Last Login: Today at 06:53:04
Date Registered: 02 July, 2009, 06:38:05
Posts: 1680


Total Post Ratings: +493

View Profile
« Reply #1484 on: 04 May, 2012, 07:00:26 »
0

Oops, I wasn't correctly remembering my previous experience with conditional comments. Yes, ...Else works. What had me confused is that I remembered ...ElseIf not working and I must have grouped the two together in my mind.
Logged
Pages: 1 ... 97 98 [99] 100 101 ... 110   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.384 seconds with 30 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.