create new tag
, view all tags, tagging instructions
* Macro function NextWord returns the first word from a string, and removes
the first word from the list. The macro parameter is:
string = a string of words.

example: %Let next=%NextWord(string) ;

%Macro NextWord(string);
%Let space=%Index(&&&string,%Str( ));
%Let size=%Length(&&&string);
%If %Eval(&space)>0 %Then %Do;
%Let NextWord=%Substr(&&&string,1,&space);
%Let &string=%Substr(&&&string,&space+1,&size-&space);
%End; %Else %Do; %Let NextWord=&&&string; %Let &string= ; %End;
%Mend NextWord;
Topic revision: r1 - 26 Nov 2008 - 10:05:07 - ArthurWatts

Copyright & by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding CTSPedia? Send feedback