Michael Clease
18-09-2007, 17:48
When working with strings in PB does the ParseSTRING make a local copy or am I working from original data.
simple example of what i mean.
'----------------------------------------------------------------------------
FUNCTION Exec_TBZZ_String2String() AS LONG
' load a bitmap.
' Usage: n = TBZZ_String2String ( StringtoCopy, StringCOPY as STRING)
'----------------------------------------------------------------------------
LOCAL String1 AS STRING
LOCAL String2 AS STRING
IF thinBasic_CheckOpenParens() THEN
thinBasic_ParseSTRING String1
IF thinBasic_CheckComma() THEN
thinBasic_ParseSTRING String2
IF thinBasic_CheckCloseParens() THEN
string2 = string1
END IF
END IF
END IF
END FUNCTION
simple example of what i mean.
'----------------------------------------------------------------------------
FUNCTION Exec_TBZZ_String2String() AS LONG
' load a bitmap.
' Usage: n = TBZZ_String2String ( StringtoCopy, StringCOPY as STRING)
'----------------------------------------------------------------------------
LOCAL String1 AS STRING
LOCAL String2 AS STRING
IF thinBasic_CheckOpenParens() THEN
thinBasic_ParseSTRING String1
IF thinBasic_CheckComma() THEN
thinBasic_ParseSTRING String2
IF thinBasic_CheckCloseParens() THEN
string2 = string1
END IF
END IF
END IF
END FUNCTION