[DUG] Maths problem for the day

Colin/Mina colmin at ihug.co.nz
Tue Jan 11 14:49:51 NZDT 2011


Why? when what you've written documents well.  For the sake of someone following you should include (Comment) it anyway
  ----- Original Message ----- 
  From: Ross Levis 
  To: 'NZ Borland Developers Group - Delphi List' 
  Sent: Tuesday, January 11, 2011 2:24 PM
  Subject: [DUG] Maths problem for the day


  Convert the following into one line.

   

  if High(Files) < 30 then Max := Bias.Position

  else if High(Files) < 300 then Max := Bias.Position*2

  else if High(Files) < 3000 then Max := Bias.Position*3

  else if High(Files) < 30000 then Max := Bias.Position*4

  etc

   

  I think there must be a way. Probably using the Power function, but I can't get my head around it.

   



------------------------------------------------------------------------------


  _______________________________________________
  NZ Borland Developers Group - Delphi mailing list
  Post: delphi at delphi.org.nz
  Admin: http://delphi.org.nz/mailman/listinfo/delphi
  Unsubscribe: send an email to delphi-request at delphi.org.nz with Subject: unsubscribe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20110111/2992eaed/attachment.html 


More information about the Delphi mailing list