*NEW* Current Version on STEAM: 16.026Logfile: EN, DEWebchat:Visit the chat
TYPE T1 i1%ENDTYPETYPE TT ia[] AS T1 ka[] FUNCTION foo: ALIAS p AS self.ia[0] ENDFUNCTIONENDTYPEFUNCTION foo: bar[] LOCAL t AS TT FOREACH a IN t.ia[]; a.i1=0; NEXT FOREACH a IN t.ia ; a.i1=0; NEXT LOCAL a$[] FOREACH b$ IN a$[]; b$="X"; NEXT FOREACH b$ IN a$ ; b$="X"; NEXT // [] [] omited t.ia[] = t.ia[] t.ia = t.ia foo(t.ka[]) foo(t.ka ) ENDFUNCTION
FUNCTION foo: ALIAS p AS ia[0] ENDFUNCTION
Next version will allow you to omit the 'self.' and the [] array indicators.Here's a test example, that already compiles:Code: (glbasic) [Select]TYPE T1 i1%ENDTYPETYPE TT ia[] AS T1 ka[] FUNCTION foo: ALIAS p AS self.ia[0] ENDFUNCTIONENDTYPEFUNCTION foo: bar[] LOCAL t AS TT FOREACH a IN t.ia[]; a.i1=0; NEXT FOREACH a IN t.ia ; a.i1=0; NEXT LOCAL a$[] FOREACH b$ IN a$[]; b$="X"; NEXT FOREACH b$ IN a$ ; b$="X"; NEXT // [] [] omited t.ia[] = t.ia[] t.ia = t.ia foo(t.ka[]) foo(t.ka ) ENDFUNCTION
in C++, some call the member variables of a TYPE (class in C++) with a 'm_' prefix. The just ".2 prefix might be good, but I hesitate touching this piece of code.I uploaded to the branch as Beta. Can someone confirm it's all working?