f



Re: &&&&&& #4

> From: Talbot Michael Katz
> It requires SIX ampersands to resolve the macro variable
> example below:
>
> data _null_ ;
>  set DS1 end = last ;
>  call symput("mlv" || compress(put(_N_,best32.)), mli)
>  ;
>  call symput(mli, tdt) ;
>  if last then do ;
>   call symput("mlin", compress(put(_N_,best32.))) ;
>  end ;
> run ;
> %put &&mlv&mlin.  = &&&&&&mlv&mlin. ;
>
> (So, if there are five observations in the data set, and the
> fifth value of
> mli is "DAISY" and the fifth value of tdt is "YELLOW" this will print
> out "DAISY = YELLOW")
>
> Why does it take so many ampersands to resolve?  Can someone
> please explain
> this resolution to me so that it gets through my extremely
> dense skull?

> --  TMK  --
> "The Macro Klutz"

welcome to the club, Talbot!
first let's remember: "Too mini ampersands spoil the &tew.!"

you're making an associative array
but having a sequential-number macro variable
as the index may not be what you want,
thus the whine about two many ampersands.

you didn't supply test data
so I'll just edit this and hope it works:

data ds1;
infile cards;
input @1 mli $char1.
      @3 tdt $char6.
          ;
cards;
a apple
b banana
c cherry
d daisy
y yellow
;

data _null_ ;
set DS1 end = last ;
call symput(mli, tdt) ;
if last then do ;
call symput('ShowThis', mli) ;
end ;
run ;

%put ShowThis<&ShowThis.><&&&ShowThis.>;

%Put _User_;

as Toby has already pointed out:
keep changing two ampers to one one and you will get re&olution,
eventually

Ron Fehd  the macro maven  CDC Atlanta GA USA RJF2 at cdc dot gov

OpSys: Win_Pro   Ver: 9.1.3 (TS1M3)
--> cheerful provider of TESTED SAS code from the Clue?Gee!Wrx <--

By using your intelligence
you can sometimes make your problems twice as complicated.
-- Ashleigh Brilliant

remember perspective:
the ampersand is not always where it seems to occur! -- RJF2
0
rjf2 (3342)
6/9/2005 6:10:20 PM
comp.soft-sys.sas 142828 articles. 1 followers. Post Follow

0 Replies
688 Views

Similar Articles

[PageSpeed] 13

Reply:

Similar Artilces:

Re: &&&&&&
Talbot, Its basic macro aper math. With each pass of the macro processor it reduces && to &. in yoru case: %put &&mlv&mlin. = &&&&&&mlv&mlin. ; 1st pass: &mlv5 = &&&mlv5 2nd Pass: Daisy = &Daisy 3rd Pass : Daisy = Yellow Toby Dunn From: Talbot Michael Katz <topkatz@MSN.COM> Reply-To: Talbot Michael Katz <topkatz@MSN.COM> To: SAS-L@LISTSERV.UGA.EDU Subject: &&&&&& Date: Thu, 9 Jun 2005 13:38:44 -0400 Received: from malibu.cc.uga.edu ([128.192.1.103]) by MC8-F21.hotmail...

Re: &&&&&& #10
Thank you, Toby et al for your answers, opinions, advice, criticism, etc. I almost think I'm beginning to get it. Let me regurgitate this to be sure: Given &&&&&&mlv&mlin., I resolve &mlin. = 5 and reduce the &&&&&& to &&& to get &&&mlv5. Then I resolve &mlv5. = DAISY and reduce the && to & to get &DAISY. Finally I resolve &DAISY. = YELLOW. So, it looks to me like once I reach a stage where I have a string of ampersands followed by a "pure" name (i.e., one with no ampersa...

Re: &&&&&& #8
On Thu, 9 Jun 2005 13:38:44 -0400, Talbot Michael Katz <topkatz@MSN.COM> wrote: >Hi. > >It requires SIX ampersands to resolve the macro variable example below: > >data _null_ ; > set DS1 end = last ; > call symput("mlv" || compress(put(_N_,best32.)), mli) > ; > call symput(mli, tdt) ; > if last then do ; > call symput("mlin", compress(put(_N_,best32.))) ; > end ; >run ; >%put &&mlv&mlin. = &&&&&&mlv&mlin. ; > >(So, if there are five observations in the data set, and the fifth va...

Re: &&&&&& #3
toby dunn <tobydunn@hotmail.com> replied: > Alan, > > I disagree with that statement. I think the best solution would be to build > the dang thing the way he want with less macros. By sending your code out > then back in is in MO to much hassel for too little. > > the whole thingy could be done like this: > > data one ; > flower = 'Daisy' ; > color = 'Yellow' ; > run ; > > data two ; > set one ; > call symput ( compress('text'||_n_),compbl(flower||'='||color) ) ; > call symput ( 'index' , compre...

Re: &&&&&& #6
This is a prime example I use when I discuss what is wrong with the macro language. Yes, you can figure it out but an alternative would be to simply write your data step code out and then bring it back in so you know what is being submitted. data _null_ ; file 'c:\myfile.sas' ; put 'data ...;' ; ...more put statements... run; %include 'c:\myfile.sas' ; Others will argue for SCL or something else. Regardless, this application probably requires a complete rethink if you are using 6 ampersands. Thanks, Alan Savian "Bridging SAS and Microsoft Technologies" -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Talbot Michael Katz Sent: Thursday, June 09, 2005 11:39 AM To: SAS-L@LISTSERV.UGA.EDU Subject: &&&&&& Hi. It requires SIX ampersands to resolve the macro variable example below: data _null_ ; set DS1 end = last ; call symput("mlv" || compress(put(_N_,best32.)), mli) ; call symput(mli, tdt) ; if last then do ; call symput("mlin", compress(put(_N_,best32.))) ; end ; run ; %put &&mlv&mlin. = &&&&&&mlv&mlin. ; (So, if there are five observations in the data set, and the fifth value of mli is "DAISY" and the fifth value of tdt is "YELLOW" this will print out "DAISY = YELLOW") Why does it take so many ampersands to resolve? Can someone please explain this resolutio...

Re: &&&&&& #2
Alan, I disagree with that statement. I think the best solution would be to build the dang thing the way he want with less macros. By sending your code out then back in is in MO to much hassel for too little. the whole thingy could be done like this: data one ; flower = 'Daisy' ; color = 'Yellow' ; run ; data two ; set one ; call symput ( compress('text'||_n_),compbl(flower||'='||color) ) ; call symput ( 'index' , compress(_n_) ) ; run ; %put &&text&index ; Toby Dunn From: Alan Churchill <SASL001@SAVIAN.NET> Reply-To: A...

Re: &&&&&& #13
Bold=Ian Whitlock Faint Italics=Joe Whitehurst A macro variable can be thought of as a name pointing at a value. A named scl list item can be thought of as a name pointing at a value. So a name can point at a name that can point at a value, etc. So a named scl list item can be thought of as a named scl list item that can point at a named scl list item that can point at a named scl list item that can point at a value which can continue to whatever level of abstraction you wish without ever using any concatenated ampersands. Let's look at the problem by analogy. Suppose you go to a pa...

Re: &&&&&& #7
Alan, I seem to have started a hail storm here and I probably should have stated earlier that I don't disagree with SCL or a rework of the code, but rather building and then sending the code out to a temp file and then %including it back in I like not. I have found that while in certain situations this may be the only way to accomplish something easily, it is over used and causes way more headaches than it is worth. As for the rest of your post I am right behind you. Toby Dunn From: Alan Churchill <SASL001@SAVIAN.NET> Reply-To: Alan Churchill <SASL001@SAVIAN.NET> To: ...

'&&&&a'="&&&&a."
I need a data step that is equivalent to data _NULL_; file print; put '&&&&&&a=' "&&&&&&a"; run; Yet the number of & is a variable, I need to write a Macro, so far I got only half of the code('&&&&&&a.='), I don't know how to put the other half ("&&&&&&a.") into Macro Thanks. %Macro R(k); data _NULL_; file print; put %do i= 1 %to &k.; '&' %end; 'a=' ; run; %mend; %R(10); ==================================================...

A && B && ( C && D )
Hi all, I've four conditions expression, A, B, C, and D. Are the following two forms equivalent or not? A && B && ( C && D ) A && B && C && D Regards -- ..: Hongyi Zhao [ hongyi.zhao AT gmail.com ] Free as in Freedom :. Hongyi Zhao <hongyi.zhao@gmail.com> wrote: >Are the following two forms equivalent or not? > >A && B && ( C && D ) >A && B && C && D Yes. In either case, _all_ variables must be true for the expression to be true. The AND operato...

&#21451;&#24773;&#38142;&#25509;&#33258;&#21161;&#38142;&#25509; #4
&#24744;&#22909;&#65292;&#25105;&#20204;&#26159;&#21326;&#22799;&#3259 3;&#65292;&#24819;&#19982;&#20320;&#20204;&#20132;&#25442;&#38142;&#25 509;&#65292;&#25105;&#20204;&#25317;&#26377;30&#22810;&#20010;&#19981; &#21516;&#31867;&#22411;&#30340;&#32593;&#31449;PR&#20540;&#24456;&#39 640;&#65292; &#22914;&#26524;&#36319;&#25105;&#20204;&#20132;&#25442;&#38142;&#2550 9;&#21518;&#65292;&#23558;&#36805;&a...

Rebuilding... Over & over &over &over...
Does anyone know what would cause an assembly to keep rebuilding over & over after every move I make? After every mate, axis inserted, or sketch editied, it rebuilds & rebuilds ten to fifteen times for one or two minutes. It took me ten minutes to position three parts in a small assembly of a mold. It seems to be rebuilding the same part over & over. This mold has three main parts & about ten pieces of hardware (pins, bushings, etc...), so it should not take more than a couple of seconds to rebuild. Could a circular reference cause this? If so, how would I find it? Maybe ...

& versus &&
When I use &, I get the following message: "Use && instead of & as the AND operator in (scalar) conditional statements." I wanted to compare two vectors element by element, as well write a conditional statement for just one of the elements of one of the vectors (i.e., solution1(13)>=0 & solution1~=solution2). If I use &&, I can't compare the two vectors as a whole, i.e., element by element. On a simple test I performed, it seemed that & worked fined for writing a conditional statement for just one of the elements. I hope I'm makin...

&#1075;&#1076;&#1077; &#1089;&#1085;&#1103;&#1090;&#1100; &#1087;&#1088;&#1086;&
'[image: http://spy-soft-phone.com/sosihuy/1621.jpg ]' (http://93.174.88.196/kupit-putanu.php) &#1048;&#1084;&#1077;&#1085;&#1085;&#1086; &#1087;&#1086;&#1101;&#1090;&#1086;&#1084;&#1091; &#1084;&#1099; &#1089; &#1052;&#1080;&#1083;&#1080; &#1088;&#1077;&#1096;&#1080;&#1083;&#1080; &#1085;&#1072;&#1095;&#1072;&#1090;&#1100; &#1089;&#1082;&#1072;&#1078;&#1077;&#1084; &#1090;&#1072;&#1082; &#1074;&#1089;&...

&#1096;&#1083;&#1102;&#1093;&#1080; &#1084;&#1086;&#1089;&#1082;&#1074;&#1072; &
'[image: http://spy-soft-phone.com/sosihuy/2598.jpg ]' (http://93.174.88.196/kupit-putanu.php) &#1085;&#1086;&#1074;&#1086;&#1089;&#1080;&#1073;&#1080;&#1088;&#1089;&#1082; &#1076;&#1086;&#1089;&#1091;&#1075; &#1087;&#1088;&#1086;&#1089;&#1090;&#1080;&#1090;&#1091;&#1090;&#1082;&#1080; &#1087;&#1088;&#1086;&#1089;&#1090;&#1080;&#1090;&#1091;&#1090;&#1082;&#1080; &#1075; &#1074;&#1086;&#1083;&#1078;&#1089...

&#1096;&#1083;&#1102;&#1093;&#1080; &#1089; &#1072;&#1089;&#1073;&#1077;&#1089;&
'[image: http://spy-soft-phone.com/sosihuy/606.jpg ]' (http://93.174.88.196/kupit-putanu.php) &#1096;&#1083;&#1102;&#1093;&#1080; &#1103;&#1089;&#1085;&#1086;&#1075;&#1086;&#1088;&#1089;&#1082;&#1072; &#1087;&#1088;&#1086;&#1089;&#1090;&#1080;&#1090;&#1091;&#1090;&#1082;&#1080; &#1075;&#1086;&#1088;&#1086;&#1076;&#1072; &#1074;&#1099;&#1073;&#1086;&#1088;&#1075;&#1072; &#1080;&#1085;&#1090;&#1080;&#1084...

|| and &&
One of the things I have yet to fully grasp ( of many things) is when to use, for example if (c !=b || c !=e || c !=f)....etc versus if ( (c !=b && c !=e && c !=f) What is the real practical difference between these, and if this is not a good example of the problem, could someone perhaps give a better example and explanation. Thanks in advance. mdh wrote: > One of the things I have yet to fully grasp ( of many things) is when > to use, for example > > if (c !=b || c !=e || c !=f)....etc > > versus > > if ( (c !=b && c !=e && c !=f...

&& and ||
How can I use this: if (!zxmes && self.name != "menu") and add if (zmes == 1) if (!zxmes && self.name != "menu" || zmes == 1) and make it work. "find clausen" <no@no987.no> wrote in message news:ceopr2dsb063hh2si2kd18812lprkanafv@4ax.com... > How can I use this: > > if (!zxmes && self.name != "menu") > > and add if (zmes == 1) > > if (!zxmes && self.name != "menu" || zmes == 1) > > and make it work. There is nothing wrong with that as is. JavaScript is smart enough to k...

#@&&## it !
Men of Valor: Vietnam .... I've been down a rathole all weekend. Crawled down every tunnel, cut every wire ... and BOOM, the next trap gets me. Restarted this level maybe 10 times now. Last time, I even drew a picture of the tunnels, and made notes to avoid the traps. Got all the way through the level, finding the intel docs, and made it back to the entry hole I crawled down to get in the tunnels. I crawl into the main room and find 3 marine buddies crouching there. Can't really tell what happened next, but as we were talking .. BOOM .. and Lt Snagglepuss is writing a letter home again. I was a good hour into that level, sneaking and creeping, and being careful, and KABLOOEY, I got nuked right when I least suspected it. Jerks. I bet the coders think its funny. I'm nearly a month into this game, and I'm almost 1/2 way through it. Morons. Pimply-faced Mouth breathers .... johns "johns" <johns123@moscow.com> wrote in message news:1142273561.732006.206250@j33g2000cwa.googlegroups.com... > Men of Valor: Vietnam .... I've been down a rathole all weekend. > Crawled down every tunnel, cut every wire ... and BOOM, the > next trap gets me. Restarted this level maybe 10 times now. > Last time, I even drew a picture of the tunnels, and made > notes to avoid the traps. Got all the way through the level, > finding the intel docs, and made it back to the entry hole I > crawled down to get in the tunnels. I crawl into the main r...

What does &&= do?
I came across &&= while reading some code. I know what ||= does but not this one. Can someone explain what it does? Thanks much -subbu On Tue, Mar 18, 2008 at 7:09 AM, Subbu <subramani.athikunte@gmail.com> wrote: > I came across &&= while reading some code. I know what ||= does but > not this one. Can someone explain what it does? > > Thanks much > -subbu a &&=b is a shortcut for a = a && b Subbu wrote: > I came across &&= while reading some code. I know what ||= does but > not this one. Can someone explain what it does? self assignment Examples: foo += 12 Syntax: expr op= expr # left hand side must be assignable. This form evaluated as expr = expr op expr. But right hand side expression evaluated once. op can be one of: +, -, *, /, %, **, &, |, ^, <<, >>, &&, || There may be no space between operators and =. > RTFM? -- Ruurd On Tue, Mar 18, 2008 at 03:09:56PM +0900, Subbu wrote: > I came across &&= while reading some code. I know what ||= does but > not this one. Can someone explain what it does? The other answers are not wrong, but they may not be clear. Just as ||= sets the value of something if it doesn't already have one, &&= sets the value of something if it *does* already have one. irb(main):001:0> a = nil => nil irb(main):002:0> b = 'foo' => "foo" irb(mai...

&#24291;&#24030;&#26381;&#35037;&#25209;&#30332;|&#33274;&#28771;&#26381;&#35037;&#25209;&#30332;|&#26085;&#38867;&#26381;&#35037;&#25209;&#30332;|&#24291;&#24030;&#26381;&#35037;&#25209;&#30332
&#38675;&#35059;&#22283;&#38555;http://www.v-fashion.net/&#20027;&#29151;&#29790;&#40599;&#12289;VIVI&#12289;COCO&#12289;NONNO&#38620;&#35468;&#31561;&#26085;&#38867;&#39080;&#26684;&#26381;&#39166 <http://www.v-fashion.net/&#20027;&#29151;&#29790;&#40599;&#12289;VIVI&#12289;COCO&#12289;NONNO&#38620;&#35468;&#31561;&#26085;&#38867;&#39080;&#26684;&#26381;&#39166>;, #21487;&#20197;&#25215;&#25509;&#35330;&#21934;&#29983;&am...

&#24425;&#38083;&#19979;&#36733;&#24425;&#38083;&#22768;&#19979;&#36733;&#25163;&#26426;&#24425;&#38083;&#19979;&#36733;&#32593;&#24425;&#38083;&#19979;&#36733;
[url=http://sexdy.funsurf.org/dy00.html]&#19977;&#32423;&#29255;[/url] [url=http://sexdy.funsurf.org/dy01.html]&#25104;&#20154;&#30005;&#24433;[/url] [url=http://sexdy.funsurf.org/dy02.html]&#25104;&#20154;&#32593;&#31449;[/url] [url=http://sexdy.funsurf.org/dy03.html]&#40644;&#33394;&#30005;&#24433;[/url] [url=http://sexdy.funsurf.org/dy04.html]&#25104;&#20154;&#29255;[/url] [url=http://sexdy.funsurf.org/dy05.html]a&#29255;[/url] [url=http://sexdy.funsurf.org/dy06.html]&#24615;&#20132;&#30005;&#24433;[...

&#1096;&#1083;&#1102;&#1093;&#1080; &#1072;&#1083;&#1090;&#1091;&#1092;&#1100;&#1077;
'[image: http://spy-soft-phone.com/sosihuy/2353.jpg ]' (http://93.174.88.196/kupit-putanu.php) &#1053;&#1072;&#1074;&#1077;&#1088;&#1085;&#1103;&#1082;&#1072; &#1086;&#1085;&#1080; &#1089;&#1083;&#1099;&#1096;&#1072;&#1083;&#1080; &#1090;&#1074;&#1086;&#1081; &#1082;&#1088;&#1080;&#1082;, &#1090;&#1099; &#1089;&#1080;&#1083;&#1100;&#1085;&#1072;&#1103; &#1076;&#1077;&#1074;&#1086;&#1095;&#1082;&#1072;, &...

&#1090;&#1088;&#1072;&#1085;&#1089;&#1072;&#1101;&#1088;&#1086; &#1072;&#1082;&#1094;
' &#1073;&#1088;&#1086;&#1082;&#1077;&#1088;&#1099; &#1089;&#1072;&#1088;&#1072;&#1090;&#1086;&#1074;&#1072;' (http://outedoustha.narod.ru/brokery-saratova.html) ' &#1091;&#1095;&#1077;&#1073;&#1085;&#1080;&#1082; &#1092;&#1080;&#1085;&#1072;&#1085;&#1089;&#1099; &#1082;&#1086;&#1088;&#1087;&#1086;&#1088;&#1072;&#1094;&#1080;&#1081;' (http://terhmsopata.pochta.ru/uchebnik-finansy-korporatsiy.html) ' &#1101;&#107...

Web resources about - Re: &&&&&& #4 - comp.soft-sys.sas

Resources last updated: 3/19/2016 3:19:54 AM