Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.os.vms    |    DEC's VAX* line of computers & VMS.    |    264,096 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 262,808 of 264,096    |
|    Chris Townley to All    |
|    Re: VMS x86-64 database server    |
|    09 Jul 25 18:56:34    |
   
   From: news@cct-net.co.uk   
      
   On 09/07/2025 18:39, Arne Vajhøj wrote:   
   > On 7/9/2025 12:51 PM, hb0815 wrote:   
   >> On 7/9/25 16:13, Arne Vajhøj wrote:   
   >> ...   
   >>> $ duo 1.txt/q,2.txt,3.txt/q   
   >>> Q=notpresent   
   >>> 1.txt Q=present   
   >>> 2.txt Q=notpresent   
   >>> 3.txt Q=present   
   >>> $ duo/q 1.txt/q,2.txt,3.txt/q   
   >>> Q=present   
   >>> 1.txt Q=present   
   >>> 2.txt Q=present   
   >>> 3.txt Q=present   
   >>>   
   >>> Where:   
   >>> 2.txt Q=present   
   >>> is not what was intended.   
   >>   
   >> If you look at the return code and not only check for success, you get   
   >> the information that a qualifier is global or local With a small C   
   >> program, I get   
   >>   
   >> $ duo/q 1.txt/q,2.txt,3.txt/q   
   >> Q=global   
   >> 1.txt:Q=local   
   >> 2.txt:Q=global   
   >> 3.txt:Q=local   
   >   
   > Ah. There is a way. Not using path but via return status.   
   >   
   > $ type duo.cld   
   > define verb duo   
   > image "sys$disk:[]duo"   
   > parameter p1, value(type=$file, list, required)   
   > qualifier q, placement=positional   
   > $ type duo.pas   
   > [inherit('sys$library:pascal$cli_routines','sys$library:starlet')]   
   > program duo(input,output);   
   >   
   > type   
   > pstr = varying [255] of char;   
   >   
   > var   
   > fnm, a, b : pstr;   
   >   
   > begin   
   > if cli$present('Q') = CLI$_PRESENT then begin   
   > writeln('Q=present')   
   > end else begin   
   > writeln('Q=notpresent')   
   > end;   
   > while odd(cli$get_value('P1', fnm.body, fnm.length)) do begin   
   > write(fnm);   
   > if cli$present('Q') = CLI$_LOCPRES then begin   
   > write(' Q=present')   
   > end else begin   
   > write(' Q=notpresent')   
   > end;   
   > writeln;   
   > end;   
   > end.   
   > $ set command duo   
   > $ pas duo   
   > $ link duo   
   > $ duo 1.txt/q,2.txt,3.txt/q   
   > Q=notpresent   
   > 1.txt Q=present   
   > 2.txt Q=notpresent   
   > 3.txt Q=present   
   > $ duo/q 1.txt/q,2.txt,3.txt/q   
   > Q=present   
   > 1.txt Q=present   
   > 2.txt Q=notpresent   
   > 3.txt Q=present   
   >   
   > I am still not keen on the approach of the same   
   > qualifier having different meaning for verb and   
   > parameters though.   
   >   
   > Arne   
   >   
      
   I cannot think of any examples at the moment, but ISTR a few times this   
   happens in DCL   
      
   --   
   Chris   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca