On Fri, May 10, 2013 at 8:28 PM, Irek Szczesniak <[email protected]> wrote: > How again can I get C/C++/JAVA's shift operators << and >> in ksh93? > > ~/bin/ksh -c 'typeset -li2 u ; (( u=0xFFFFFFEFFFFFFFFF ; u=u<<2 ; )) ; print > $u' > /home/irek/bin/ksh: u=0xFFFFFFEFFFFFFFFF ; u=u<<2 ; : arithmetic syntax error
Erm... replace the ';' with ',' in the arithmetical expressions, e.g. (( expr , expr )) Using that it works here: -- snip -- $ ksh -c 'typeset -li2 u ; (( u=0xFFFFFFEFFFFFFFFF , u=u<<2 , )) ; print $u' 2#1111111111111111111111111011111111111111111111111111111111111100 -- snip -- ---- Bye, Roland -- __ . . __ (o.\ \/ /.o) [email protected] \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /==\ O\ TEL +49 641 3992797 (;O/ \/ \O;) _______________________________________________ ast-users mailing list [email protected] http://lists.research.att.com/mailman/listinfo/ast-users
