Help Center
Help CenterFreeBASIC

__FB_UNQUOTE__keyword

Intrinsic define (macro) performed by the compiler.

Intrinsic Defineskeyworddocumented

Syntax

__FB_UNQUOTE__( arg )

Parameters

NameDescription
argargument

Description


Takes a literal string and converts it back to tokens.
More precisely, __FB_UNQUOTE__ returns a sub-quoted text compared to the one passed through the argument (the argument may already be an over-quoted string, and so the return will be a simple string in this case).

Remarks

Version


  • Since fbc 1.08.0

Differences from QB


  • New to FreeBASIC

See also


Example


#macro m( arg )

    Scope

        Var v1 = arg

        #print TypeOf(v1)

        Print v1

        Var v2 = __FB_UNQUOTE__( arg )

        #print TypeOf(v2)

        Print v2

    End Scope

#endmacro



m("""Hello""")

m("1")



Sleep



/' Compiler output:

STRING

STRING

STRING

INTEGER

'/



/' Output:

"Hello"

Hello

1

 1

'/

#define X __FB_QUOTE__( Print "hello" )

#macro Y( arg )

  __FB_UNQUOTE__( arg )

#endmacro



Print X

Y( X )



/' Output:

print "hello"

hello

'/

Reference

  • Documented in KeyPgDdfbunquote.html