Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
26 May, 2013, 08:42:45 *
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]   Go Down
  Print  
Author Topic: GDB and output problem -  (Read 335 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
tilky
LV0 Newcomer (Next: 5)

Offline Offline

Last Login: 12 December, 2012, 23:40:30
Date Registered: 24 September, 2012, 21:17:10
Posts: 4

Topic starter
Total Post Ratings: 0

View Profile
« on: 17 October, 2012, 22:47:39 »
0

I have this code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
Repeat getKey(9)
0~K
If R<14
If getKey(47)
Output(R,0,"A"
R+1~R
1~{GDB3+1}
47~K
End
While getKey(K)=1
End
End
End
In case it wasn't self explanatory, ~ is the Sto>.

Now, what should happen if you repeatedly press math is that you get an output that it "AAAAAAAAAAAAAAA"

But what is really happening is a display like "Annnnnnnnnnnn" with the "n"s italicized.

It works properly if i leave out the line with the GDB write, or if i don't add a number to the pointer.

I am new to Axe, so most i just figured out by trial and error, but i can't firgure this one out Frustrated 
Logged
shmibs
bonsai bok choy wiseguy waterboy
Administrator
LV10 31337 u53r (Next: 2000)
*
Offline Offline

Last Login: Yesterday at 09:50:02
Date Registered: 11 June, 2010, 19:36:15
Location: 89B6
Posts: 1855


Total Post Ratings: +240

View Profile
« Reply #1 on: 18 October, 2012, 16:00:45 »
0

did you ever declare GDB3 anywhere? STR, PIC, and GDB are used as pointers to positions in your program, so, if you start writing to them you will be overwriting parts of your program. it looks like you're probably overwriting the letter you're trying to output somehow, as character 01 is that italicised n.
Logged



We're not human, are we?
aeTIos
You got stair'd!
LV12 Extreme Poster (Next: 5000)
************
Offline Offline

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 #2 on: 18 October, 2012, 16:05:12 »
0

I don't get it. Why would you need GBD3? You aren't doing anything with it.
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
shmibs
bonsai bok choy wiseguy waterboy
Administrator
LV10 31337 u53r (Next: 2000)
*
Offline Offline

Last Login: Yesterday at 09:50:02
Date Registered: 11 June, 2010, 19:36:15
Location: 89B6
Posts: 1855


Total Post Ratings: +240

View Profile
« Reply #3 on: 18 October, 2012, 16:09:48 »
0

he's just messing around to try to figure out how things work, i think.
Logged



We're not human, are we?
aeTIos
You got stair'd!
LV12 Extreme Poster (Next: 5000)
************
Offline Offline

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 #4 on: 18 October, 2012, 16:11:43 »
0

Hmm, he did never declare GDB3. I think he's overwriting the $32 for A with $01 which is indeed n(I think it's $32)
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
tilky
LV0 Newcomer (Next: 5)

Offline Offline

Last Login: 12 December, 2012, 23:40:30
Date Registered: 24 September, 2012, 21:17:10
Posts: 4

Topic starter
Total Post Ratings: 0

View Profile
« Reply #5 on: 18 October, 2012, 20:42:47 »
0

that is the problem.  i did declare it, but with Data()~GBD3, which was writing over the program i guess.  I declared it as Data(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0) and it works fine.  Thanks so much shmibs!
Logged
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 #6 on: 18 October, 2012, 21:26:48 »
0

If you declared it as Data()→GDB3, then the behaviour of your program is normal Wink
Here is your program, untouched:

Data()→GDB3
[??]
.I think you have declared some data inbetween, or
.maybe some code before that loop declared some data
.Else, the output would not be "Annnnn" but "AAnnnnn"

Repeat getKey(9)
0~K
If R<14
If getKey(47)
Output(R,0,"A"
R+1~R
1→{GDB3+1}
47~K
End
While getKey(K)=1
End
End
End

Here is how Axe translates it:

Data()→GDB3
[??]
"A"→Str0
Repeat getKey(9)
0~K
If R<14
If getKey(47)
Output(R,0,Str0)
R+1~R
1→{GDB3+1}
47~K
End
While getKey(K)=1
End
End
End

Which is basically the same as this, since there is nothing in the Data():

[??]→GDB3
"A"→Str0
Repeat getKey(9)
0~K
If R<14
If getKey(47)
Output(R,0,Str0)
R+1~R
1→{GDB3+1}
47~K
End
While getKey(K)=1
End
End
End

And now, Str0=GDB3+1, so when you do 1→{GDB3+1}, it replaces the A by a n, which is why you got the n 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
Pages: [1]   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.257 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.