Difference between revisions of "SET STRICT"

From Lianjapedia
Jump to: navigation, search
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
Determines whether non-string expressions are automatically converted when added to strings
+
Determines whether variables must be pre-declared
  
 
==Syntax==
 
==Syntax==
Line 9: Line 9:
  
 
==Description==
 
==Description==
If SET STRICT is OFF, non-string expressions are automatically converted as they are added to a string.  If SET STRICT is ON, expressions must be converted manually using the ETOS() or other data conversion functions.  By default, STRICT is ON.
+
With SET STRICT ON, all variables must be pre-declared.  By default, SET STRICT is OFF.
  
 
==Example==
 
==Example==
 
<code lang="recital">
 
<code lang="recital">
 
set strict off
 
set strict off
echo "This string can add numerics and dates etc. " + 100.89 + " " + date()
+
m_var = date()
 
+
 
set strict on
 
set strict on
echo "This string can add numerics and dates etc. " + str(100.89,6,2) + " " + etos(date())
+
private m_var
 +
m_var = date()
 
</code>
 
</code>
  

Revision as of 10:41, 1 February 2016

Purpose

Determines whether variables must be pre-declared

Syntax

SET STRICT ON | OFF | (<expL>)

See Also

DTOC(), DTOS(), ECHO, ETOS(), LTOS(), SET STRCONVERT, STR()

Description

With SET STRICT ON, all variables must be pre-declared. By default, SET STRICT is OFF.

Example

set strict off
m_var = date()
 
set strict on
private m_var
m_var = date()

Products

Lianja, Lianja Server