Re: Pointer work around

new topic     » goto parent     » topic index » view thread      » older message » newer message

I've ported some polygon-drawing routines written i C to Euphoria, and I
had to solve the problem with pointers. This is how I did it:
I changed anything looking like this:

struct {
int X
int Y
}Array

char Array *pt1
int Crap

Crap=pt1->X


to this:

sequence Array
integer Crap
constant X=1
constant Y=2
Array=repeat(0,2)

Crap=Array[X]



...And anything looking like this:

int Array[200]

int Crap

Crap=*(Array+100)


was changed to this:

sequence Array
integer Crap
Array=repeat(0,200)

Crap=Array[100]


I hope this makes sense. It worked anyway...

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu