ASP.NET School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

 

Code Snippets

  

ASP Source Code


Welcome to Dream.In.Code
Become a ASP.NET Expert!

Join 300,369 ASP.NET Programmers for FREE! Get instant access to thousands of ASP.NET experts, tutorials, code snippets, and more! There are 1,443 people online right now. Registration is fast and FREE... Join Now!





Some "missing" logic functions

Logic functions that should have been in VB and ASP, but were not.

Submitted By: Chubber
Actions:
Rating:
Views: 932

Language: ASP

Last Modified: June 12, 2007

Snippet


  1. Function IIf(TheBoolean, TruePart, FalsePart)
  2. If TheBoolean Then
  3.      IIf = TruePart
  4. Else
  5.      IIf = FalsePart
  6. End If
  7. End Function
  8. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  9. Function Min(One, Two)
  10. If One > Two Then
  11.      Min = Two
  12. Else
  13.      Min = One
  14. End If
  15. End Function
  16. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  17. Function Max(One, Two)
  18. If One < Two Then
  19.      Max = Two
  20. Else
  21.      Max = One
  22. End If
  23. End Function
  24. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  25. Function Floor(InVal)
  26.      If InVal > 0 Then
  27.           Floor = Int(InVal)
  28.      Else
  29.           Floor = Int(InVal) - 1
  30.      End If
  31. End Function

Copy & Paste


Comments


There are currently no comments for this snippet. Be the first to comment!

Add comment


You must be registered and logged on to </dream.in.code> to leave comments.





Live ASP.NET Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

ASP.NET Tutorials

Reference Sheets

ASP.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month