Promille v1.0 by Dieter Hildenbrand Internet: dhild@t-online.de Fidonet: 2:245/5509.21 ------------------------------- Description: Shows Level of Alcohol in your Body in a 24-Hour Diagram (1) type in your Weight... (2) choose your Sex (3) input Time begin drinking for example: 3.5 means 3:30am 14 means 2:00pm 19.5 means 7:30pm (4) input Quantity of your Drink in Litre (5) input Alcoholcontents of your Drink in Vol% you find it at the label of the Bottle !? (6) you can then choose more Inputs or calculate Graphic (7) Graphic: use Trace-Mode to see x=Time/y=Value (8) after viewing the Graphic press EXE (9) now you can choose calculating the same Drinks with different Weight/Sex or end the Program (10) please excuse wrong words or grammar, my English is horrible ;-) -------------------------------- Sign Conversion: => Then sign -> Store sign _ Display sign =/= Not Equal to sign / Division * Multiply -------------------------------- words after // are only comments ---------------------------------------------------------------------- Norm AxesOn CoordOn LabelOff GridOff 0->A~Z Seq(T,T,0,24,.5) List Ans->List 1 List 1->List 2 List 1->List 3 List 1->List 4 Fill(0,List 2) Fill(0,List 3) Fill(0.79,List 4) // 0.79 = max. Alcoholvalue allow for Lbl 6 // drive a car (in Germany!) ClrText "WEIGHT (KG)"?->K ClrText Locate 7,3,"1 - MAN" Locate 7,5,"2 - WOMAN" Lbl 0 Getkey->G If G=72 Then K*.7->K Goto 1 IfEnd If G=62 Then K*.6->K Goto 1 IfEnd Goto 0 Lbl 1 N=1=>Goto 5 0->E Lbl 2 ClrText Locate 6,3,"1 - INPUT" Locate 6,5,"2 - GRAPHIC" Lbl 3 Getkey->G G=62=>E=/=1=>Goto 3 G=62=>E=1=>Goto 5 G=72=>Goto 4 Goto 3 Lbl 4 ClrText 1->E "TIME"?->U U>23.5=>Goto 4 "LITRE"?->L "VOL%"?->V Int (U/.5)+1->J List 2[J]+L/0.1*V->List 2[J] Goto 2 Lbl 5 ClrText Locate 6,4,"CALCULATION" Locate 6,6,"PERCENT:" // % only to see something during Fill(0,List 3) // calculation :-) For 1->J To 48 Locate 15,6,Int (100*J/97) // %, next Locate too If List 2[J]=/=0 Then List 3[J+1]>0=>List 3[J+1]+List 2[J]/K->List 3[J+1] List 3[J+1]=0=>List 2[J]/K->List 3[J+1] For J+2->I To 49 List 3[I-1]-.05->List 3[I] List 3[I]<.01=>0->List 3[I] Next IfEnd Next For 1->J To 49 Locate 15,6,Int (100*(J+48)/97) If List 3[J]=/=0 Then Int List 3[J]->A Int (Frac List 3[J]*100)->B Frac (Frac List 3[J]*100)>.5=>1+B->B B/100->B (A+B)-.05->C C<.01=>0->C C->List 3[J] IfEnd Next ClrGraph S-WindMan S-Gph1 DrawOn,xyLine,List1,List3,1,Dot,Blue // Alcoholvalues S-Gph2 DrawOn,Scatter,List1,List4,1,Dot,Blue // 0.79 Limit ViewWindow 0,24,1,-.5,2,1 DrawStat_ ClrGraph ClrText Locate 3,3,"1 - WEIGHT/SEX" Locate 3,6,"2 - END" Lbl 7 Getkey->G If G=72 Then 1->N Goto 6 IfEnd G=62=>Goto 8 Goto 7 Lbl 8 ClrText