An interesting code snippet to get a string variable from print using:
Although I cannot find a more efficient way to do this..
Erik.
Code: (Select All)
'sample assigning formatted string from print using to a variable:
Rem x$ = Print Using "###"; 100
X = FreeFile
F$ = "tempfile.bak"
Print "Enter value";
Input Z#: If Z# = 0# Then Z# = 100#
Print "Enter format";
Input Z$: If Z$ = "" Then Z$ = "###"
'write print using value
Open F$ For Output As #X
Print #X, Using Z$; Z#
'read print using value
Close
Open F$ For Input As #X
If EOF(X) = 0 Then
Line Input #X, S$
Print S$ ' this is the output value
End If
Close
End
Erik.