Example:
In C I would do something like:
The typ1=typ2 thingy is my problem. It makes them identical
but when I change something in either typ1 or typ2 the other also change.. Not what I want.. Anyone??
Type mytype Field a, b EndType Function test(x:mytype) 'Here do something to x:mytype EndFunction Function Blah() typ1:mytype = New mytype typ2:mytype = New mytype typ1.a = 10 typ1.b = 5 'Make typ2 like a "temp" of typ1 'Change typ2 without(!) changing anything in typ1.. typ1 = typ2 'Does not work test(typ2) EndFunction
In C I would do something like:
struct mytype { char a; char b; }; void test(struct mytype *ptr) { // Change something } void Blah(void) { struct mytype typ1; struct mytype typ2; typ1.a = 10; typ1.b = 5; typ1 = typ2; test(&typ2); }
The typ1=typ2 thingy is my problem. It makes them identical
but when I change something in either typ1 or typ2 the other also change.. Not what I want.. Anyone??