You need the variable to be a GLobal variable to be read inside of a function e.g.
GLOBAL name$ AS STRING
GLOBAL L AS INTEGER
CLS : L=1 : name$="Guest"
uline()
END
`****************************FUNCTIONS*************************
FUNCTION uline()
DO
CLS
IF L=1
PRINT name$
INPUT "$ ", command$
ELSE
INPUT "$ ", command$
ENDIF
LOOP
ENDFUNCTION
or you could pass the name$ in as a parameter e.g.
GLOBAL L AS INTEGER
CLS : L=1 : name$="Guest"
uline(name$)
END
`****************************FUNCTIONS*************************
FUNCTION uline(name$ AS STRING)
DO
CLS
IF L=1
PRINT name$
INPUT "$ ", command$
ELSE
INPUT "$ ", command$
ENDIF
LOOP
ENDFUNCTION
Hope this helps,
Jas