okay, just want to let you guys know that i solved the problem. (with the help of the search function on this board) :-) here's the source:
Function GetEnvVar$(VariableName$) TempBank = CreateBank(1) size = api_GetEnvironmentVariable%(VariableName$,TempBank,1) If size > 0 Then ResizeBank TempBank,Size+1 api_GetEnvironmentVariable%(VariableName$,TempBank,Size+1) Else Return "" End If retstring$ = "" For t = 0 To BankSize(tempbank)-3 retstring$ = retstring$ + Chr(PeekByte(tempbank,t)) Next FreeBank tempbank Return retstring$ End Function