0 Replies - 935 Views - Last Post: 12 June 2007 - 05:22 AM

#1 Chubber  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 0
  • View blog
  • Posts: 131
  • Joined: 16-October 06

Some "missing" logic functions

Posted 12 June 2007 - 05:22 AM

Description: Logic functions that should have been in VB and ASP, but were not.
Function IIf(TheBoolean, TruePart, FalsePart)
If TheBoolean Then
     IIf = TruePart
Else
     IIf = FalsePart
End If
End Function
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Function Min(One, Two)
If One > Two Then
     Min = Two
Else
     Min = One
End If
End Function
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Function Max(One, Two)
If One < Two Then
     Max = Two
Else
     Max = One
End If
End Function
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Function Floor(InVal)
     If InVal > 0 Then
          Floor = Int(InVal)
     Else
          Floor = Int(InVal) - 1
     End If
End Function


Is This A Good Question/Topic? 0
  • +

Page 1 of 1