1. RE: Request for Eu 2.4

Kat wrote:
> On 4 Feb 2003, at 21:30, xerox_irs at lvcm.com wrote:
> 
> > 
> > Another thing that would be good is if you could assign a variable a 
> > part
> > of
> > another so
> > atom a
> > sequence b
> > 
> > b={1,2,3,4}
> > a=assign(b,2)
> > a=5
> > now b={1,5,3,4}
> > b[2]=7
> > now a=7
> 
> This is what we used pointers for in the bad ole days. Pointing into 
> records, 
> pointers for multiple typecasting, pointers for indexing.
> 
> Kat

And something I'm sure will never be implemented in official Euphoria.  
That's more confusing than passing parameters by reference (IMHO)...

-- Brian

new topic     » topic index » view message » categorize

2. RE: Request for Eu 2.4

On 5 Feb 2003, at 18:50, Brian Broker wrote:

> 
> 
> Kat wrote:
> > On 4 Feb 2003, at 21:30, xerox_irs at lvcm.com wrote:
> > 
> > > 
> > > Another thing that would be good is if you could assign a variable a 
> > > part
> > > of
> > > another so
> > > atom a
> > > sequence b
> > > 
> > > b={1,2,3,4}
> > > a=assign(b,2)
> > > a=5
> > > now b={1,5,3,4}
> > > b[2]=7
> > > now a=7
> > 
> > This is what we used pointers for in the bad ole days. Pointing into 
> > records, 
> > pointers for multiple typecasting, pointers for indexing.
> > 
> > Kat
> 
> And something I'm sure will never be implemented in official Euphoria.  

Well, yeas, Rob has already said no to pointers, but there will prolly be a 
convoluted workaround by another name.

> That's more confusing than passing parameters by reference (IMHO)...

Not really. 
a : char
b : byte pointed at a
c : boolean pointed to a

# a b and c all point to the same byte in memory
# a b and c are all different types

a := 'z'

therefore:
b = 122
c = TRUE

?a = 'z'
?b = 122
?c = TRUE (or 122, depending if you have fuzzybool or not)

Kat

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu