Code Comments
Programming Forum and web based access to our favorite programming groups.Hi, awkers, I'm getting a bitabout the rules for what is a regexp and what isn't (inspired by the confusion that the vim syntax highlighter suffers from). I'm assuming it's something to do with precedence, but can anyone enlighten me further? Take this: awk -va=1 -vb=1 -vc=1 '{print a /(b+1)/ c, /(b+1)/, a (/b+1/) c}' The first expression had the thing between the /s evaulated numerically, the second has it evaluated as a regexp (in gawk, at any rate). The third (fairly obviously because of the brackest) has it as a regexp (the space is necessary to prevent a(...) looking like a functions). Why? What are the rules? Thanks -Ed -- (You can't go wrong with psycho-rats.) (er258)(@)(eng.cam)(.ac.uk) /d{def}def/f{/Times findfont s scalefont setfont}d/s{10}d/r{roll}d f 5/m {moveto}d -1 r 230 350 m 0 1 179{1 index show 88 rotate 4 mul 0 rmoveto} for /s 15 d f pop 240 420 m 0 1 3 { 4 2 1 r sub -1 r show } for showpage
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.