# Some "missing" logic functions

Page 1 of 1

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

### #1 Chubber

Reputation: 0
• 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

 .related ul { list-style-type: circle; font-size: 12px; font-weight: bold; } .related li { margin-bottom: 5px; background-position: left 7px !important; margin-left: -35px; } .related h2 { font-size: 18px; font-weight: bold; } .related a { color: blue; }