Re: How can I Work with strings?
From: JSeeman102 <jseeman102_at_aol.com>
Date: 1997/10/07
Message-ID: <19971007203301.QAA08484_at_ladder01.news.aol.com>#1/1
Date: 1997/10/07
Message-ID: <19971007203301.QAA08484_at_ladder01.news.aol.com>#1/1
You can use the 'decode' function.
In your example, let's assume that the variable 'and_or' holds either 'AND' or 'OR'. You could write
... answer = decode(and_or,'AND','Y','OR','O',<default>) ..
Decode functions as a sort of immediate if. If you pseudo-coded the above algortithm, it would look like this:
IF and_or equals 'AND' THEN
answer = 'Y'
ELSE IF and_or equals 'OR' THEN
answer = 'O'
ELSE
answer = <default>
Jeff Seeman Received on Tue Oct 07 1997 - 00:00:00 CEST