Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 8 of 8 total
Thread Functions & IF
Mon, Dec 17 2007 11:56 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

I finally figured out the IF statement (the function still doesn't work Smiley. Its highly counter intuitive to someone used to Pascal, and could do with an example like the following in the manual showing that you need a ; after what to me seems like each bit of the statement

IF (FldStr = CompStr)
THEN SET RES = TRUE;
ELSE SET RES = FALSE;
END IF;

It was only after despairingly reading through the manual in the hope that something would tell me why my function isn't working I suddenly twigged to this from an example elsewhere.

Roy Lambert
Mon, Dec 17 2007 3:28 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< I finally figured out the IF statement (the function still doesn't work
Smiley. Its highly counter intuitive to someone used to Pascal, and could do
with an example like the following in the manual showing that you need a ;
after what to me seems like each bit of the statement

IF (FldStr = CompStr)
THEN SET RES = TRUE;
ELSE SET RES = FALSE;
END IF;

It was only after despairingly reading through the manual in the hope that
something would tell me why my function isn't working I suddenly twigged to
this from an example elsewhere. >>

I don't define the SQL/PSM - the standards body does that.  As for the
semi-colon at the end of the statement, that is described here:

http://www.elevatesoft.com/edb1sql_if.htm

You'll notice that the <StatementBlock> definition shows that each
<Statement> must end with a semicolon.

--
Tim Young
Elevate Software
www.elevatesoft.com

Tue, Dec 18 2007 3:38 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim


But to my pea sized brain if .. then .. else .. IS A STATEMENT - now I know better.

Roy Lambert
Tue, Dec 18 2007 5:10 AMPermanent Link

"Rita"

"Roy Lambert" <roy.lambert@skynet.co.uk> wrote in message
news:D08CC35A-1510-418F-97F7-97F46354C4A3@news.elevatesoft.com...
>I finally figured out the IF statement (the function still doesn't work
>Smiley. Its highly >counter intuitive to someone used to Pascal.

Pascal IF was a pain for most folks who came from dBase or xBase
languages, but as you say working away in Delphi with Elevates products
you then have to figure out the syntax for SQL standard as well is another
pain. The difference between Tim and others around here Roy you and I
are in our late 50's and them guys are a lot younger. I cant wait until some
guy in MIT comes up with a human kernel so we reload everything we
have learnt in life back to our memorys.

if age => 50
forget everything
elseif age < 50
be a smart ass
endif

Dopy old bird ;-(



Tue, Dec 18 2007 3:53 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< But to my pea sized brain if .. then .. else .. IS A STATEMENT - now I
know better. >>

That's perfectly normal since Delphi considers it a statement.
Unfortunately, SQL2003 doesn't. Smiley

--
Tim Young
Elevate Software
www.elevatesoft.com

Tue, Dec 18 2007 3:55 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Rita,

<< Pascal IF was a pain for most folks who came from dBase or xBase
languages, but as you say working away in Delphi with Elevates products you
then have to figure out the syntax for SQL standard as well is another pain.
The difference between Tim and others around here Roy you and I are in our
late 50's and them guys are a lot younger. I cant wait until some guy in MIT
comes up with a human kernel so we reload everything we have learnt in life
back to our memorys. >>

I think it's more that, as we get older, we tend to get more resistant to
learning new things.  I've noticed it happening to me quite a bit to me
also.  It's perfectly normal, of course, because who doesn't need/want a
break after 20-30 years in the programming business. Smiley

--
Tim Young
Elevate Software
www.elevatesoft.com

Tue, Dec 18 2007 3:57 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Rita,

<< I've noticed it happening to me quite a bit to me also. >>

See, it even happens to us 37-year olds.   What the hell kind of sentence
the above is, I'll never know. Smiley

--
Tim Young
Elevate Software
www.elevatesoft.com

Wed, Dec 19 2007 12:29 AMPermanent Link

"Rita"
Just make sure you write good help files
so you can lookup how to do
things you wrote yourself Wink

Oh! yea sort out EDBManager before
Roy finds something right with it Wink

Me I unzipped my old Clipper app
tonight and got carried away I fixed
a ton of stuff that wasnt even broke,
just made it better really but nobody will
ever see it except me ;-(

My mate CJ who lives in OHIO has jumped
ship to everything iMac in his old age, so my
latest multi million quid money magnet is back
on hold until I find another sucker err mate.

Rita

"Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote in message
news:111020AB-F0F4-431A-9E54-B11F3D468EB4@news.elevatesoft.com...
> Rita,
>
> << I've noticed it happening to me quite a bit to me also. >>
>
> See, it even happens to us 37-year olds.   What the hell kind of sentence
> the above is, I'll never know. Smiley
>
> --
> Tim Young
> Elevate Software
> www.elevatesoft.com
>

Image