Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!van-bc!ubc-cs!uw-beaver!zephyr.ens.tek.com!tektronix!sequent!tb From: tb@sequent.sequent.com (Tony Booker) Newsgroups: comp.unix.shell Subject: Re: AWK:String <--> Integer ?? Message-ID: Date: 26 Mar 91 09:46:34 GMT References: <3135@inews.intel.com> Sender: tb@sequent.UUCP Followup-To: comp.unix.shell Organization: Sequent Computer Systems Lines: 21 In-reply-to: mbodas@natukawa.intel.com's message of 20 Mar 91 03:12:18 GMT In article <3135@inews.intel.com> mbodas@natukawa.intel.com (Milind Bodas) writes: When a variable is assigned using substr() function in an awk script, it seems that it cann't be used in certain numerical/logical operations. For example in following piece of code, the for loop is executed only 4 times instead of 38 times - My man page for awk does say: BUGS There are no explicit conversions between numbers and strings. To force an expression to be treated as a number add 0 to it; to force it to be treated as a string concaten- ate "" to it. -- The above drivel is mine. Company drivel sounds _MUCH_ more plausible ;^)