Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
26 May, 2013, 07:53:19 *
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] 2   Go Down
  Print  
Author Topic: Function - How to use "Data"  (Read 503 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
danny90444
LV3 Member (Next: 100)
***
Offline Offline

Gender: Male
Last Login: 13 February, 2013, 20:28:02
Date Registered: 18 June, 2012, 19:37:24
Location: Across the Universe
Posts: 41


Topic starter
Total Post Ratings: 0

View Profile WWW
« on: 03 July, 2012, 00:43:14 »
0

I just wanted a further explanation of this:

Data(NUM,...)
Key: ΔList() 
Adds the bytes to program memory. Numbers ending with r are added as 2 byte numbers.

Logged

Schrodinger's cat walks into a bar... and doesn't.
kindermoumoute
LV8 Addict (Next: 1000)
********
Offline Offline

Last Login: 24 May, 2013, 17:48:08
Date Registered: 15 May, 2010, 17:53:56
Posts: 837


Total Post Ratings: +51

View Profile
« Reply #1 on: 03 July, 2012, 00:50:08 »
+1

You have to point your liste of data. Eg :

1
:Data(2,5,100,40,3)->Str1

You can read those data in this way :

1
2
3
4
5
6
7
8
9
:{Str1}
:.Return 2

:{Str1+1}
:.Return 5

...

:{Str1+X}

If you want add a 2-bytes number, you can use ^r (2nd angle 3) :

1
2
3
4
5
6
7
8
9
10
11
12
13
:Data(12,500^r,200,30000^r)->Pic1

:{Pic1}
:.Return 12

:{Pic1+1}^r
:.Return 500

:{Pic1+3}
:.Return 200

:{Pic1+4}^r
:.Return 30000
« Last Edit: 03 July, 2012, 00:50:44 by kindermoumoute » 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%
danny90444
LV3 Member (Next: 100)
***
Offline Offline

Gender: Male
Last Login: 13 February, 2013, 20:28:02
Date Registered: 18 June, 2012, 19:37:24
Location: Across the Universe
Posts: 41


Topic starter
Total Post Ratings: 0

View Profile WWW
« Reply #2 on: 03 July, 2012, 00:53:39 »
0

Which numbers are two bye and which are single bye , etc ?
Logged

Schrodinger's cat walks into a bar... and doesn't.
kindermoumoute
LV8 Addict (Next: 1000)
********
Offline Offline

Last Login: 24 May, 2013, 17:48:08
Date Registered: 15 May, 2010, 17:53:56
Posts: 837


Total Post Ratings: +51

View Profile
« Reply #3 on: 03 July, 2012, 00:56:55 »
+1

Endeed a byte is 8 bits. Then a byte can take 2^8 (=256) values, that to say a number beetwen 0 and 255. A 2 byte number can take 2^16 (=65356) values, it means a number beetwen 0 and 65355.

Axe variables are 2 bytes number.
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%
danny90444
LV3 Member (Next: 100)
***
Offline Offline

Gender: Male
Last Login: 13 February, 2013, 20:28:02
Date Registered: 18 June, 2012, 19:37:24
Location: Across the Universe
Posts: 41


Topic starter
Total Post Ratings: 0

View Profile WWW
« Reply #4 on: 03 July, 2012, 01:02:05 »
0

Endeed a byte is 8 bits. Then a byte can take 2^8 (=256) values, that to say a number beetwen 0 and 255. A 2 byte number can take 2^16 (=65356) values, it means a number beetwen 0 and 65355.

Axe variables are 2 bytes number.

Thanx this really helps.
Logged

Schrodinger's cat walks into a bar... and doesn't.
danny90444
LV3 Member (Next: 100)
***
Offline Offline

Gender: Male
Last Login: 13 February, 2013, 20:28:02
Date Registered: 18 June, 2012, 19:37:24
Location: Across the Universe
Posts: 41


Topic starter
Total Post Ratings: 0

View Profile WWW
« Reply #5 on: 03 July, 2012, 20:57:33 »
0

Do you know about anything about numbers bigger than 65355? Are they 3 bytes or 4 or something like that?
Logged

Schrodinger's cat walks into a bar... and doesn't.
blue_bear_94
LV7 Elite (Next: 700)
*******
Offline Offline

Gender: Male
Last Login: Today at 03:01:27
Date Registered: 09 May, 2012, 02:45:26
Location: Earth
Posts: 586


Total Post Ratings: +3

View Profile
« Reply #6 on: 03 July, 2012, 21:00:51 »
0

You can combine 2 real variables or use the OP registers...
Logged


Kraphyko (TI-89 Image Editor) 80%
Starvak 2 1%
TI-84+SE User (2.55 MP 2.43)
TI-89 Titanium User (3.10)
Casio Prizm User (1.02)
Spoiler for Programming Languages:
TI-83+ Basic - 4
TI-83+ Asm - 1
TI-89 Basic - 2
TI-89 C - 2.5
Computer C - 2
GameMaker - 3
Java - 1.5
Racket - 3
Scala - 1
Le jeu.
Spoiler for Ultimate Internet Meme:
<a href="http://www.youtube.com/watch?v=zOMvDCRWBLI" target="_blank">http://www.youtube.com/watch?v=zOMvDCRWBLI</a>
Spoiler for Banner:


This server is always updated to the newest snapshot. Please don't try to join it on 1.4.7.
Sunrise 3 will have to wait till about a week later.
Spoiler for hellowld.radiation:
<< stdradiation

I must have had too much radiation for breakfast...I must have had too much radiation for breakfast...I must have had too much radiation for breakfast...I must have had too much radiation for breakfast... XDXD[I must have had too much radiation for breakfast...I must have had too much radiation for breakfast...I must have had too much radiation for breakfast...I must have had too much radiation for breakfast... Crazy, I must have had too much radiation for breakfast... Evil Laugh CrazyBig smile]
 Cheesy({ MadSmileySmileySadSmileySadSadSad, MadSmileySmileySadSadSmileySadSmiley,
 MadSmileySmileySadSmileySmileySadSad, MadSmileySmileySadSmileySmileySadSad,
 MadSmileySmileySadSmileySmileySmileySmiley, MadSmileySadSadSadSadSad,
 MadSmileySmileySmileySadSmileySmileySmiley, MadSmileySmileySadSmileySmileySmileySmiley,
 MadSmileySmileySmileySadSadSmileySmiley, MadSmileySmileySadSmileySmileySadSad,
 MadSmileySmileySadSadSmileySadSad, MadSad});
Spoiler for Give Internet!:
danny90444
LV3 Member (Next: 100)
***
Offline Offline

Gender: Male
Last Login: 13 February, 2013, 20:28:02
Date Registered: 18 June, 2012, 19:37:24
Location: Across the Universe
Posts: 41


Topic starter
Total Post Ratings: 0

View Profile WWW
« Reply #7 on: 05 July, 2012, 02:18:57 »
0

Combine how ? and what are OP registers?
Logged

Schrodinger's cat walks into a bar... and doesn't.
Hayleia
Programming Absol
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Last Login: Today at 07:18:37
Date Registered: 01 June, 2011, 20:12:47
Location: ud-ud ?
Posts: 2059


Total Post Ratings: +256

View Profile
« Reply #8 on: 05 July, 2012, 08:07:40 »
0

You can combine 2 real variables or use the OP registers...
Or use this Wink
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
ben_g
LV7 Elite (Next: 700)
*******
Offline Offline

Gender: Male
Last Login: Yesterday at 19:53:30
Date Registered: 08 May, 2011, 21:03:27
Location: (ix+$43)
Posts: 651


Total Post Ratings: +82

View Profile
« Reply #9 on: 05 July, 2012, 14:04:57 »
0

Do you know about anything about numbers bigger than 65355? Are they 3 bytes or 4 or something like that?
Depends on how much bigger than 65355.
Logged

Spoiler for completely unimportant stuff:
My projects
 - A base converter that also supports signed and fixed-point numbers.
 - A first person shooter with a polygon-based 3d engine.
Spoiler for latest screenshot:
- A java MORPG.
Spoiler for screenshot:
- a minecraft game in axe
Spoiler for Only open this spoiler if you want to read what's inside:
What's inside.
From when I saw this image, I never lost the game again!
Spoiler for This is [Edit:
not[/Edit] my contest entry. I hope you like it.]
danny90444
LV3 Member (Next: 100)
***
Offline Offline

Gender: Male
Last Login: 13 February, 2013, 20:28:02
Date Registered: 18 June, 2012, 19:37:24
Location: Across the Universe
Posts: 41


Topic starter
Total Post Ratings: 0

View Profile WWW
« Reply #10 on: 05 July, 2012, 18:00:01 »
0

Do you know about anything about numbers bigger than 65355? Are they 3 bytes or 4 or something like that?
Depends on how much bigger than 65355.

Like in the millions.
Logged

Schrodinger's cat walks into a bar... and doesn't.
Hayleia
Programming Absol
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Last Login: Today at 07:18:37
Date Registered: 01 June, 2011, 20:12:47
Location: ud-ud ?
Posts: 2059


Total Post Ratings: +256

View Profile
« Reply #11 on: 05 July, 2012, 18:04:41 »
0

Basically, to know the limit of X bytes, you do 2X*8-1.
So 1 byte stops at 255, 2 bytes stop at 65535, etc 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
danny90444
LV3 Member (Next: 100)
***
Offline Offline

Gender: Male
Last Login: 13 February, 2013, 20:28:02
Date Registered: 18 June, 2012, 19:37:24
Location: Across the Universe
Posts: 41


Topic starter
Total Post Ratings: 0

View Profile WWW
« Reply #12 on: 05 July, 2012, 18:06:31 »
0

Basically, to know the limit of X bytes, you do 2X*8-1.
So 1 byte stops at 255, 2 bytes stop at 65535, etc Smiley

Ok thanks . Whats OP though?
Logged

Schrodinger's cat walks into a bar... and doesn't.
calcdude84se
Needs Motivation
Members
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: 14 May, 2013, 16:12:14
Date Registered: 21 April, 2010, 04:20:59
Posts: 2207


Total Post Ratings: +62

View Profile
« Reply #13 on: 06 July, 2012, 08:50:48 »
0

The OP "registers" are a set of memory areas that are used as operands by the OS's floating point routines. Unless you need floating point, there shouldn't be a need to explicitly deal with them.
If you want to do math with larger integers, you basically need to write the routines yourself (precluding a library/axiom already having been written. I don't follow Axe too much.).
For example, to add the number BA (formed from variables A and B) to DC, and store the result back to BA, you could do something like A+C->A<C+B+D->B, where -> is the STO> symbol.
An easier-to-follow variation goes like this:

1
2
3
4
5
6
A+C->A
If A<C
B+D->B
Else
B+D+1->B
End
Logged

"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Bug me about PartesOS. I might just need reminding.
aeTIos
You got stair'd!
LV12 Extreme Poster (Next: 5000)
************
Online Online

Gender: Male
Last Login: Today at 07:39:15
Date Registered: 15 September, 2010, 06:00:00
Location: Netherlands, Overijssel
Posts: 3121


Total Post Ratings: +120

View Profile
« Reply #14 on: 06 July, 2012, 14:38:59 »
0

By the way, the r in the description is the radians r (it's in the [2nd][Apps] menu)
Logged

If something above sounds rude, feel free to vote it down, it was not meant to be rude<<lolol
--Always stay relAXEd!--


Spoiler for Hidden:


[







Spoiler for Still Alive:
This was a triumph.
I'm making a note here: HUGE SUCCESS.
It's hard to overstate my satisfaction.

Aperture Science:
We do what we must because we can.
For the good of all of us
Except the ones who are dead.

But there's no sense crying over every mistake
You just keep on trying till you run out of cake
And the science gets done and you make a neat gun
For the people who are still alive.

I'm not even angry.
I'm being so sincere right now.
Even though you broke my heart and killed me.
And tore me to pieces.
And threw every piece into a fire.
As they burned it hurt because
I was so happy for you.

Now these points of data make a beautiful line
And we're out of beta we're releasing on time.
So I'm GLaD I got burned think of all the things we learned
For the people who are still alive.

Go ahead and leave me.
I think I prefer to stay inside.
Maybe you'll find someone else to help you.
Maybe Black Mesa -
THAT WAS A JOKE. HA HA, FAT CHANCE.
Anyway, this cake is great:
It's so delicious and moist.

Look at me still talking when there's science to do.
When I look out there it makes me GLaD I'm not you.
I've experiments to run there is research to be done
On the people who are still alive

And believe me I am still alive.
I'm doing science and I'm still alive.
I feel FANTASTIC and I'm still alive.
While you're dying I'll be still alive.
And when you're dead I will be still alive.

Still alive
Still alive
Pages: [1] 2   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.471 seconds with 31 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.