Classic ASP Framework
org.classicasp.primitive

PrimitiveUtil, used to pull everything together.

Summary

Casts a variable as an object.
Returns first non-empty variable in array.
Returns first non-empty variable.
Returns second param if true, third param if false.
Detects if an object has been cast.
Casts a variable as an object.

CastEx

Public Function CastEx(ByRef oValue)
Casts a variable as an object.

Returns

Variant

Example

		
  Set myVar = CastEx(myVar)
  

CoalesceArrayEx

Public Function CoalesceArrayEx(ByVal vInputValue)
Returns first non-empty variable in array.

Returns

Variant

Example

          
  Set myVar = CoalesceArrayEx(myArray)
  

CoalesceEx

Public Function CoalesceEx(
ByVal vInputValue1,
ByVal vInputValue2)
Returns first non-empty variable.

Returns

Variant

Example

		
  Set myVar = CoalesceEx(myVar1, myVar2)
  

IfEx

Public Function IfEx(
ByVal vInputValue1,
ByVal vInputValue2,
ByVal vInputValue3)
Returns second param if true, third param if false.

Returns

Variant

IsPrimitive

Public Function IsPrimitive(ByRef oValue)
Detects if an object has been cast.

Returns

Variant

Example

		
  If (IsPrimitive(myVar)) Then
  

Primitive

Public Function Primitive(ByRef oValue)
Casts a variable as an object.

Returns

Variant

Example

		
  Set myVar = Primitive(myVar)
  

'***ClassicASP.org
'Copyright 2010 ClassicASP.org

'This file is part of ClassicASP Framework.

'ClassicASP-Framework is free software: you can redistribute it and/or modify
'it under the terms of the GNU General Public License as published by
'the Free Software Foundation, version 3 of the License.

'ClassicASP-Framework is distributed in the hope that it will be useful,
'but WITHOUT ANY WARRANTY; without even the implied warranty of
'MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
'GNU General Public License for more details.

'You should have received a copy of the GNU General Public License
'along with ClassicASP-Framework. If not, see .

'For additional information please visit .

Created with TwinText