Charles Pegge
21-07-2009, 14:08
Oxygen supports multi-line strings using ` (and also " outside of a thinBasic script. )
Below is a new kind of string literal suitable for embedding guest scripts that use quote marks themselves.
( With inline thinBasic scripts however, you can't use single or double quotes)
The format for a superquote is:
quote any_marker_word ... any_marker_word
This can be spread onto more than one line:
quote
any_marker_word
...
any_marker_word
Oxygen Update http://community.thinbasic.com/index.php?topic=2517
'----------
'SUPERQUOTE
'==========
uses "oxygen"
dim src as string
src = "
#basic
function fun() as long
dim a as string
;====================
( ' block test
a=quote
-NorwegianParrotScript-
squawk!
=))o<
` ` `
polygon
pining for the fjords
;lovely plumage
-NorwegianParrotScript- `ok`
;====================
)
print a
end function
fun
"
'msgbox 0,o2_prep src
o2_basic src
if len(o2_error) then
msgbox 0, o2_error : stop
end if
o2_exec
Below is a new kind of string literal suitable for embedding guest scripts that use quote marks themselves.
( With inline thinBasic scripts however, you can't use single or double quotes)
The format for a superquote is:
quote any_marker_word ... any_marker_word
This can be spread onto more than one line:
quote
any_marker_word
...
any_marker_word
Oxygen Update http://community.thinbasic.com/index.php?topic=2517
'----------
'SUPERQUOTE
'==========
uses "oxygen"
dim src as string
src = "
#basic
function fun() as long
dim a as string
;====================
( ' block test
a=quote
-NorwegianParrotScript-
squawk!
=))o<
` ` `
polygon
pining for the fjords
;lovely plumage
-NorwegianParrotScript- `ok`
;====================
)
print a
end function
fun
"
'msgbox 0,o2_prep src
o2_basic src
if len(o2_error) then
msgbox 0, o2_error : stop
end if
o2_exec