Hi Richard, I think it error message means that parameter volrefnum% can't be in a register. Look for the second * in the error message. Try this: DIM @ volrefnum% Regards Stu Cram, Regina, SK Canada >I am trying to create a disk file. When the following function is accessed >during program flow, I get the error shown below the function. > >LOCAL >DIM volrefnum% >DIM @filename$ as str31 >DIM 31 NA$ >LOCAL FN saveas > IF LEN(gfilename$) > 0 THEN NA$ = gfilename$ ELSE NA$ = "gTitle$" > REM NA$ is the default file name string to use below > filename$ = FILES$(_fSave,"Save the melody as:",NA$,volrefnum%) 'This >line gives the error > LONG IF LEN(filename$) > 0 > gfilename$ = filename$ > gvrefnum = volrefnum% > FN dosave > END IF >END FN > >======================================================= >Error: Can't use a register variable here! Use DIM @ >in file Sebastian:SEBASTIAN.MAIN at line 999 in SAVEAS > *filename$ = FILES$(_fSave,"Save the melody as:",NA$,*volrefnum%) > >I have "use register based vars for speed" checked under preferences, but I >have the @ symbol before the string variable name (filename$) in the DIM >statement which, I understand should force the variable to be stored in >RAM. Why doesn't the compiler see the @ symbol? (I am using Release 6 and >Mac OS 8.6) Or, am I missing something?