Click here to Skip to main content
Licence 
First Posted 29 Nov 2004
Views 38,240
Bookmarked 14 times

BAC Calc

By | 29 Nov 2004 | Article
Blood-alcohol level calculator.

Sample Image

Introduction

A handy-dandy blood-alcohol calculator. Obviously, this isn't to be used as an accurate measuring device, just rough estimate.

Background

Found a picture here that had a BAC formula, so I coded it for weekend use.

Using the code

Change the values as needed, your estimated BAC will update automagically. Here's the formula, for the curious.

(Number of drinks / 2) * (9 / Weight for Men  OR 7.5 / 
             Weight for Women) - (.016 * Hours Drinking) = BAC

Points of Interest

Setting all controls on the forms' 'value changed' (or equivalent) to the same 'calc()' function made for little code.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Adam McKee

Software Developer (Senior)

United States United States

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
QuestionCode Comments? Pinmemberkusokurae15:41 2 Dec '04  
Questionam i drunk or not? Pinmemberdiesel_travis10:09 30 Nov '04  
AnswerRe: am i drunk or not? Pinmemberstrtdusty12:08 30 Nov '04  
GeneralRe: am i drunk or not? Pinsussleewsimpson7:06 1 Dec '04  
GeneralRe: am i drunk or not? Pinsussleewsimpson7:06 1 Dec '04  
Answer...I just added extra labels to my version... Pinmemberdiesel_travis11:17 1 Dec '04  
GeneralRe: ...I just added extra labels to my version... Pinmemberdiesel_travis11:20 1 Dec '04  
GeneralRe: ...I just added extra labels to my version... Pinmemberkusokurae14:58 2 Dec '04  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web02 | 2.5.120517.1 | Last Updated 30 Nov 2004
Article Copyright 2004 by Adam McKee
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid