help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Help-glpk] Wish list - an extended "if then else" statement


From: Meketon, Marc
Subject: RE: [Help-glpk] Wish list - an extended "if then else" statement
Date: Sat, 1 Jan 2011 10:55:04 -0600

Cool!  Thank you!  A bit of a kludge, but a lot better than my kludge.


-----Original Message-----
From: glpk xypron [mailto:address@hidden
Sent: Saturday, January 01, 2011 7:50 AM
To: Meketon, Marc; address@hidden
Subject: Re: [Help-glpk] Wish list - an extended "if then else" statement

Hello Marc,

> for{(time,ad) in EVENTS} {
>   if ad='A' then printf "dual=%3g  %5d\n", ARRIVALS[time].dual, time
>
>   else printf "          %5d dual=%3g\n", time, DEPARTURES[time].dual;
> }
>
> but that doesn't work.

This is the closest you can get with the existing syntax:

for{(time, ad) in EVENTS} {
  printf{ i in {1} : ad == "A" }
    "dual=%3g  %5d\n", ARRIVALS[time].dual, time;
  printf{ i in {1} : ad != "A" }
    "%5d dual=%3g\n", time, DEPARTURES[time].dual; }

Best regards

Xypron

--
NEU: FreePhone - kostenlos mobil telefonieren und surfen!
Jetzt informieren: http://www.gmx.net/de/go/freephone
----------------------------------------------------------------------------
This e-mail and any attachments may be confidential or legally privileged.  If 
you received this message in error or are not the intended recipient, you 
should destroy the e-mail message and any attachments or copies, and you are 
prohibited from retaining, distributing, disclosing or using any information 
contained herein.  Please inform us of the erroneous delivery by return e-mail.

Thank you for your cooperation.
----------------------------------------------------------------------------


This e-mail and any attachments may be confidential or legally privileged. If 
you received this message in error or are not the intended recipient, you 
should destroy the e-mail message and any attachments or copies, and you are 
prohibited from retaining, distributing, disclosing or using any information 
contained herein.  Please inform us of the erroneous delivery by return e-mail. 
Thank you for your cooperation.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]