f

Re: '^=' and '~='? #7

```SAS was originally based on PL/1, and having programmed in PL/1,=20
I'm inclined to use the PL/1 symbol for not equals, which is the
^=3D (actually it is not the caret on IBM mainframes, but the not symbol
which looks like L on its side). =20

-Mary
----- Original Message -----=20
To: SAS-L@LISTSERV.UGA.EDU=20
Sent: Thursday, February 12, 2009 9:09 AM
Subject: Re: '^=3D' and '~=3D'?

Maybe good reason to use mnemonic equivalents.

882  data _null_;
883     a =3D .v MIN .z;
884     b =3D .v MAX .z;
885     ax =3D .v >< .z;
886     bx =3D .v <> .z;
NOTE: The "<>" operator is interpreted as "MAX".
887     c =3D .A NE .A;
888     put (_all_)(=3D);;
889     run;

a=3DV b=3DZ ax=3DV bx=3DZ c=3D0
```
 0
mlhoward (1803)
2/12/2009 3:52:18 PM
comp.soft-sys.sas 142828 articles. 3 followers.

0 Replies
813 Views

Similar Articles

[PageSpeed] 35

Similar Artilces:

'is not' or '!='
A newbie question to you; what is the difference between statements like: if x is not None: and if x != None: Without any context, which one should be preferred? IMHO, the latter is more readable. On 2014-08-18 21:35, ElChino wrote: > A newbie question to you; what is the difference between statements > like: > if x is not None: > and > if x != None: > > Without any context, which one should be preferred? > IMHO, the latter is more readable. > "x == y" tells you whether x and y refer to objects that are equal. "x is y" tells you whether x and y actually refer to the same object. In the case of singletons like None (there's only one None object), it's better to use "is". "ElChino" <elchino@cnn.cn>: > A newbie question to you; what is the difference between statements > like: > if x is not None: > and > if x != None: Do the following: take two \$10 bills. Hold one bill in the left hand, hold the other bill in the right hand. Now, the bill in the left hand "is not" the bill in the right hand. However, the bill in the left hand "==" the bill in the right hand. > Without any context, which one should be preferred? > IMHO, the latter is more readable. In almost all cases, both tests would result in the same behavior. However, the "is not" test is conceptually the correct one since you want...

'^=' and '~='?
Hello, What is the difference between '^=' and '~='? Thanks, Duckhye ...

Re: '^=' and '~='?
Duckhye, According to the doc ( http://xrl.us/befwjx ) they, and one other set of characters, and the mnemonic 'NE' all represent 'NOT EQUAL'. Art ------- On Wed, 11 Feb 2009 16:52:40 -0600, Duck-Hye Yang <dyang@CHAPINHALL.ORG> wrote: >Hello, >What is the difference between '^=' and '~='? > >Thanks, >Duckhye ...

Re: if str_mo not in ('','.') and str_da not in ('','.') and str_yy not in ('','.') Any shorter ? #2
Igor, There are many ways to make it more concise, however the parsimony is likely to be achieved at the expense of clarity. For instance, the expressions length ( input (mm||dd||yy, \$10.) ) > 2 length ( compress(mm||dd||yy, ' .') ) > 2 and like might be somewhat shorter than the original, but they will execute slower, and their intent is far less eminent. Since it appears that you are trying to validate the components of a date, maybe it is not a worthless idea to try the date informat conforming to the mask you are testing. Say if all the pieces are 2-digit, the expression input (mm||dd||yy, ?? mmddyy6.) will return a missing value for the case you are testing and also if any irregularities in the input value that prevent it from being interpreted as a valid date should be found. And if you want a note in the log to alert you about it, leave one of the question marks off. Kind regards, ================= Paul M. Dorfman Jacksonville, FL ================= >From: Igor Kurbeko <ikurbeko@ATHEROGENICS.COM> >Reply-To: Igor Kurbeko <ikurbeko@ATHEROGENICS.COM> >To: SAS-L@LISTSERV.UGA.EDU >Subject: if str_mo not in ('','.') and str_da not in ('','.') and str_yy > not in ('','.') Any shorter ? >Date: Wed, 22 Oct 2003 17:13:37 -0400 > >Hi, there. > > > >I'm just curious if it ever dawned on anybody how to abbreviate this >line : > >if ...

Re: if str_mo not in ('','.') and str_da not in ('','.') and str_ yy not in ('','.') Any shorter ? #3
> From: Igor Kurbeko [mailto:ikurbeko@ATHEROGENICS.COM] > I'm just curious if it ever dawned on anybody > how to abbreviate this line : > > if str_mo not in ('','.') > and str_da not in ('','.') > and str_yy not in ('','.') %*in autoexec:; %Let Blank = Blank; %Let Invalid = Invalid; %*in aFormat; PROC Format; value \$StrValu %*somevalues = 'ok'; '','.' = "&Blank." %* other = "&Invalid."; ; %*in Program; if put(Str_...

Re: if str_mo not in ('','.') and str_da not in ('','.') and str_ yy not in ('','.') Any shorter ? #4
Igor, Without robust error checking: %macro check ( vars , values , op = in /* not in */, con = and /* or */ ) ; %local i w ; %let i = 1 ; %let w = %scan(&vars,&i) ; %do %while ( %length ( &w ) > 0 ) ; %if &i > 1 %then &con ; &w &op &values %let i = %eval ( &i + 1 ) ; %let w = %scan(&vars,&i) ; %end ; %mend check ; option mprint ; data w ; retain x y z "a" r " " s t "a" a b 99 c . ; if %check( x y z , ('','.'), op = not in ) then put &qu...

'''''''''''''The Running Update/Append Queries Using VBA code Ordeal'''''''''''''' #2

if str_mo not in ('','.') and str_da not in ('','.') and str_yy not in ('','.') Any shorter ?
Hi, there. =20 I'm just curious if it ever dawned on anybody how to abbreviate this line : if str_mo not in ('','.') and str_da not in ('','.') and str_yy not in ('','.')=20 =20 Igor Kurbeko Clinical Programmer Analyst 678 336 4328 ikurbeko@atherogenics.com =20 no brain no pain =20 how about: if not (str_mo in ('','.') or str_da in ('','.') or str_yy in ('','.')) OR if not (missing(str_mo) or missing(str_da) or missing(str_yy)) Eric On 22 Oct 03 21:13:37 GMT, ikurbeko@ATHER...

A function with 'and' , 'not' , 'null' , 'car' and 'cdr'
What's this ? (defun enigma (x) (and (not (null x)) (or (null (car x)) (enigma (cdr x))))) "I suppose I should learn Lisp, but it seems so foreign." - Paul Graham, Nov 1983 On Wed, Oct 07 2015, CAI GENGYANG wrote: > What's this ? > > > (defun enigma (x) > (and (not (null x)) > (or (null (car x)) > (enigma (cdr x))))) Bad taste? It returns T if the list X contains nil as an element. It would be clearer to write (some #'null x). Helmut CAI GENGYANG ...

Re: '^=' and '~='? #5
Sorry, I posted under the wrong subject. My friend asked me to post this, she got an error message in processing the XML file. I don't have much experience in working with XML file. Any help is appreciated! On Thu, Feb 12, 2009 at 10:29 AM, Akshaya Nathilvar < akshaya.nathilvar@gmail.com> wrote: > 32 libname erap 'T:\9SOW\AHRQ_E Rap\Data\E-RAP Data\December 2008'; > NOTE: Libref ERAP was successfully assigned as follows: > Engine: V9 > Physical Name: T:\9SOW\AHRQ_E Rap\Data\E-RAP Data\December 2008 > 33 options nodate nonumber formdlim='-'; > 34 /* Program: E-RAP Load XML to SAS with map v2.sas*/ > 35 > /************************************************************************* > 36 Update path and file name below. > 37 > **************************************************************************/ > 38 %let data_path = T:\9SOW\AHRQ_E Rap\Data\E-RAP Data\December > 2008\Raw XML Data; > 39 %let input_file = 035151_12232008.xml; > 40 > **************************************************************************; > 41 > 42 filename xml_lib "&data_path.\&input_file."; > 43 filename SXLEMAP "&data_path.\xml_map_v2.map"; > 44 libname xml_lib xml xmlmap=SXLEMAP access=READONLY; > NOTE: Libref XML_LIB was successfully assigned as follows: > Engine: XML > Physical Name: XML_LIB &g...

Re: '^=' and '~='? #4
Yeah, <> works in PROC SQL, wasn't sure about elsewhere... thanks for confirmation! Didn't know about the MAX operator, that's interesting. -Joe On Thu, Feb 12, 2009 at 8:51 AM, Chang Chung <chang_y_chung@hotmail.com>wrote: > On Wed, 11 Feb 2009 17:03:27 -0600, Joe Matise <snoopy369@GMAIL.COM> > wrote: > > >No difference that I know of ... SAS has all sorts of things you can use > as > >operators. > > > >LT,< > >LE,<= > >ne, ^=, ~=, <> in some contexts at least > > hi, > at least in the data step, <>, does not mean not equal, it is the MAX > operator, returning the larger of the two. Similarly there is MIN operator, > ><. in MS Visual Basic, though, "<>" means "not equal." > There are three symbols used as the logical operators OR and another three > for logical NOT, but the availability of these symbols are platform > dependent. > Read about 9.2 (data step) language Operators at http://tinyurl.com/4w5hen > or > http://support.sas.com/documentation/cdl/en/lrcon/59522/HTML/default/a00078 > 0367.htm<http://support.sas.com/documentation/cdl/en/lrcon/59522/HTML/default/a00078%0A0367.htm> > hth. > Cheers, > Chang > ...

Re: '^=' and '~='? #9
On Thu, 12 Feb 2009 08:58:21 -0600, Joe Matise <snoopy369@GMAIL.COM> wrote: >Yeah, <> works in PROC SQL, wasn't sure about elsewhere... thanks for >confirmation! Didn't know about the MAX operator, that's interesting. .... hi, In proc SQL, I do get a note saying that: NOTE: The "<>" operator is interpreted as "not equals". In general, i find that we have different sas expressions, mostly identical one another. Still, there remain definite differences among all of these expressions: (1) data step expressions (2) where statement expressions (3) sql-expressions used in proc sql (4) macro expressions this is a less than ideal situation :-) but this may be an inevitable consequence of sas' being around for a long time. cheers, chang ...

Re: '^=' and '~='? #8
32 libname erap 'T:\9SOW\AHRQ_E Rap\Data\E-RAP Data\December 2008'; NOTE: Libref ERAP was successfully assigned as follows: Engine: V9 Physical Name: T:\9SOW\AHRQ_E Rap\Data\E-RAP Data\December 2008 33 options nodate nonumber formdlim='-'; 34 /* Program: E-RAP Load XML to SAS with map v2.sas*/ 35 /************************************************************************* 36 Update path and file name below. 37 **************************************************************************/ 38 %let data_path = T:\9SOW\AHRQ_E Rap\Data\E-RAP Data\December 2008\Raw XML Data; 39 %let input_file = 035151_12232008.xml; 40 **************************************************************************; 41 42 filename xml_lib "&data_path.\&input_file."; 43 filename SXLEMAP "&data_path.\xml_map_v2.map"; 44 libname xml_lib xml xmlmap=SXLEMAP access=READONLY; NOTE: Libref XML_LIB was successfully assigned as follows: Engine: XML Physical Name: XML_LIB 45 libname erap "&data_path"; NOTE: Libref ERAP was successfully assigned as follows: Engine: V9 Physical Name: T:\9SOW\AHRQ_E Rap\Data\E-RAP Data\December 2008\Raw XML Data 46 * Read XML file into SAS data set; 47 data erap.Sabino; 48 set xml_lib.E_rap_episode_record; 49 run; ERROR: There is an illegal character in the entity name. encountered during XMLInput pa...

Re: '^=' and '~='? #3
On Wed, 11 Feb 2009 17:03:27 -0600, Joe Matise <snoopy369@GMAIL.COM> wrote: >No difference that I know of ... SAS has all sorts of things you can use as >operators. > >LT,< >LE,<= >ne, ^=, ~=, <> in some contexts at least hi, at least in the data step, <>, does not mean not equal, it is the MAX operator, returning the larger of the two. Similarly there is MIN operator, ><. in MS Visual Basic, though, "<>" means "not equal." There are three symbols used as the logical operators OR and another three for logical NOT, but the availability of these symbols are platform dependent. Read about 9.2 (data step) language Operators at http://tinyurl.com/4w5hen or http://support.sas.com/documentation/cdl/en/lrcon/59522/HTML/default/a00078 0367.htm hth. Cheers, Chang ...

Re: '^=' and '~='? #6
On 2/12/09, Chang Chung <chang_y_chung@hotmail.com> wrote: > On Wed, 11 Feb 2009 17:03:27 -0600, Joe Matise <snoopy369@GMAIL.COM> wrote: > > >No difference that I know of ... SAS has all sorts of things you can use > as > >operators. > > > >LT,< > >LE,<= > >ne, ^=, ~=, <> in some contexts at least > > hi, > at least in the data step, <>, does not mean not equal, it is the MAX > operator, returning the larger of the two. Similarly there is MIN operator, > ><. in MS Visual Basic, though, "<>" means "not equal." > There are three symbols used as the logical operators OR and another three > for logical NOT, but the availability of these symbols are platform > dependent. Maybe good reason to use mnemonic equivalents. 882 data _null_; 883 a = .v MIN .z; 884 b = .v MAX .z; 885 ax = .v >< .z; 886 bx = .v <> .z; NOTE: The "<>" operator is interpreted as "MAX". 887 c = .A NE .A; 888 put (_all_)(=);; 889 run; a=V b=Z ax=V bx=Z c=0 ...

Re: '^=' and '~='? #2
No difference that I know of ... SAS has all sorts of things you can use as operators. LT,< LE,<= ne, ^=, ~=, <> in some contexts at least eq, = <<< these actually DO have a difference or two, particularly as relates to assignment I don't recall where the full list is, but http://support.sas.com/onlinedoc/913/getDoc/en/lrdict.hlp/a000202951.htm#a000290128has the list of them usable in WHERE statements (which, IIRC, is slightly greater than that of normal code, as it allows for SQL syntax in ways the rest of SAS does not). -Joe On Wed, Feb 11, 2009 at 4:52 PM, Duck-Hye Yang <dyang@chapinhall.org> wrote: > Hello, > What is the difference between '^=' and '~='? > > Thanks, > Duckhye > ...

error: expected '=', ',', ';', 'asm' or '__attrib
Hi I'm trying to compile an ADC Driver & come acrosss the following error. I've no experience writing drivers before, and hence have no clue how to fix it. Hope someone out there has encountered the problem & suggesst a fix for the same. The Error is I get is : qadc.c: At top level: qadc.c:97: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'qadc_read' make: *** [qadc.o] Error 1 [root@localhost qadc]# ########################################################################### ADC Driver Code ##...

Override 'and' and 'or'
Is it possible to override 'and' and/or 'or'? I cannot find a special method for it... __and__ and __rand__ and __or__ and __ror__ are for binary manipulation... any proposals? Have marvelous sunday, Marco Dekker <m.aschwanden@gmail.com> wrote: > Is it possible to override 'and' and/or 'or'? I cannot find a special > method for it... __and__ and __rand__ and __or__ and __ror__ are for > binary manipulation... any proposals? If you want to customize the truth value testing you have to implement __nonzero__ " __nonzero__( self) Call...

'!' vs. '.'
Is there an advantage to using the '!' notation to represent form/ control relationships? (eg. Me!text1 vs Me.text1) I am currently using the '.' notation exclusively (for code completion in the VB Editor), but much of the high-quality code that I've seen (in Duane Hookom's Query-by-Form db, for example) uses the other. Here's one opinion for you: http://doc.advisor.com/doc/05352 robert.waters wrote: >Is there an advantage to using the '!' notation to represent form/ >control relationships? (eg. Me!text1 vs Me.text1) > >I am currently using the '.' notation exclusively (for code completion >in the VB Editor), but much of the high-quality code that I've seen >(in Duane Hookom's Query-by-Form db, for example) uses the other. -- HTH - RuralGuy (RG for short) acXP WinXP Pro Please post back to this forum so all may benefit. Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/databases-ms-access/200704/1 Here's my \$0.02 worth on this. I tend to copy the notation style and naming conventions that I see being used in the Help files. That would be Me![text1] for a control on a form. I am of the belief that this notation explicitly refers to a control itself rather than a field in the form's recordset. Here's an example: I have a parts inventory app that uses a "Line" code, which is usually a 3-character abbreviation for a brand name, and is the na...

Difference between 'is' and '=='
Hey guys, this maybe a stupid question, but I can't seem to find the result anywhere online. When is the right time to use 'is' and when should we use '=='? Thanks alot~ mwql: >Hey guys, this maybe a stupid question, but I can't seem to find the >result anywhere online. When is the right time to use 'is' and when >should we use '=='? http://docs.python.org/ref/comparisons.html -- Ren� Pijlman mwql wrote: > Hey guys, this maybe a stupid question, but I can't seem to find the > result anywhere online. When is the right time to ...

Does '!=' equivelent to 'is not'
I'm a bit confusing about whether "is not" equivelent to "!=" if a != b: ... if a is not b: ... What's the difference between "is not" and "!=" or they are the same thing? pirata wrote: > I'm a bit confusing about whether "is not" equivelent to "!=" > > if a != b: > ... > > if a is not b: > ... > > > What's the difference between "is not" and "!=" or they are the same thing? No, they are not the same thing. == and != test to see if the *value* of two variables are the same. Like so: >>> a = 'hello world' >>> b = 'hello world' >>> a == b True a and b both have the value of 'hello world', so they are equal is and is not, however, do not test for value equivalence, they test for object identity. In other words, they test to see if the object the two variables reference are the same object in memory, like so: >>> a is b False a and b are assigned to two different objects that happen to have the same value, but nevertheless there are two separate 'hello world' objects in memory, and therefore you cannot say that a *is* b Now look at this: >>> c = d = 'hello world' >>> c == d True >>> c is d True In this case, they are again the same value, but now the is test also shows that they are the same *object* as well, because...

'[OFF]' as in 'offensive'???
Hi, given that 'off-topicness' is indicated as '[OT]' and taking a look at those postings that started the threads indicated as '[OFF]' (which may both be seen as being somewhat offensive) may lead to the conclusion that '[OFF]' stands for offensiveness. I don't think that this is the intended meaning so what actually *does* '[OFF]' mean? I never came across that abbreviation before (although I have been around on the USENET for quite some time) but maybe it is worth knowing? Josef 'Jupp' Schugt NOTE: mails >100 KiB are ignored -- German edition of comp.lang.ruby FAQ - http://oss.erdfunkstelle.de/ruby/ Aurox Linux - http://qurl.net/7q | http://qurl.net/7r - Firefox Thunderbird - http://qurl.net/7s | http://qurl.net/7t - Liferea Enigmail - http://qurl.net/7u | http://qurl.net/7v - GnuPG [Josef 'Jupp' Schugt <jupp@gmx.de>, 2004-12-10 23.20 CET] > I don't think that this is the intended meaning so what actually *does* > '[OFF]' mean? Off-topic. ...

logical to 'on' / 'off'
Hi, is there a function implemented doing this conversion? my Problem is, that I want to use the following code: set(handles.edit_curr_trq_sl,'Enable',get(hObject,'Value')) where get(hObject,'Value') gives the state of a checkbox thank you! function [str]=tf2oo(logic) switch logic case 0 str='off'; case 1 str='on'; end%switch end%function tf2oo() while i do not know a built in function, I use my own:) meisterbartsch wrote: > > > function [str]=tf2oo(logic) > switch logic > case 0 > str='off'; &g...

difference between ',' and 'a,'
Small question. In gforth is there a difference between the words ',' and 'a,'? I'm thinking not, so perhaps another question, why have both ',' and 'a,'? Thanks Should be the same, in gforth: see , : , here cell allot ! ; ok see a, : , here cell allot ! ; ok On Friday, January 9, 2015 at 5:46:04 AM UTC-8, beeflo wrote: > Small question. In gforth is there a difference between the words ',' and 'a,'? > > I'm thinking not, so perhaps another question, why have both ',' and 'a,'? > > Thanks beeflo <beeflobill@gmail.com> writes: >Small question. In gforth is there a difference between the words ',' and 'a,'? > >I'm thinking not, so perhaps another question, why have both ',' and 'a,'? In Gforth itself, there is no difference. In Gforth's cross compiler, "a," is there for addresses, and "," is there for other cells; addresses can then be relocated when loading the image. - anton -- M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html New standard: http://www.forth200x.org/forth200x.html EuroForth 2014: http://www.euroforth.org/ef14/ ...

Web resources about - Re: '^=' and '~='? #7 - comp.soft-sys.sas

Resources last updated: 3/16/2016 11:57:20 AM