Article View: alt.lang.awk
Article #31Calling AWK function from within SC as a macro !!
From: Vilok Kusumakar
Date: Mon, 07 Jun 1993 18:00
Date: Mon, 07 Jun 1993 18:00
23 lines
1562 bytes
1562 bytes
Has anybody used @ext(se, e) feature of SC - the spreadsheet calculator ?
I am trying to call an awk script "days" like this
@ext(days, C1)
where cell C1 has data in the format - 01/05/92
The "days" script looks like this
awk '{print (substr($1,1,2)+((substr($1,4,2)-1)*30)+((substr($1,7,2)-92)*365))}' $1
It converts the above date format into number of days since 1/1/92. I
think the problem is that C1 is not getting passed as $1 to this awk
script. In @ext(se, e), how does "e" gets passed to external function
"se" ?
Any help will be appreciated.
--
Vilok Kusumakar OSI Protocols for tomorrow......
vilok@bnr.ca Bell-Northern Research, Ltd.
Phone: (613) 763-2273 P.O. Box 3511, Station C
Fax: (613) 765-4777 Ottawa, Ontario, K1Y 4H7
Technical Details
Message-ID:
<1993Jun7.180006.2670@bmerh85.bnr.ca>Path:
arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!torn!nott!bnrgate!bcars6a8!bmerh85!bmerh322!vilokShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 14b500,93d2274a30211d1e,start X-Google-Attributes: gid14b500,public X-Google-Thread: 109023,93d2274a30211d1e,start X-Google-Attributes: gid109023,public X-Google-ArrivalTime: 1993-06-07 11:24:46 PST Newsgroups: alt.lang.awk,bnr.unix Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!torn!nott!bnrgate!bcars6a8!bmerh85!bmerh322!vilok From: vilok@bmerh322.bnr.ca (Vilok Kusumakar) Subject: Calling AWK function from within SC as a macro !! Message-ID: <1993Jun7.180006.2670@bmerh85.bnr.ca> Sender: news@bmerh85.bnr.ca (Usenet News) Reply-To: vilok@bnr.ca Organization: Bell-Northern Research, Ottawa, Canada Date: Mon, 7 Jun 93 18:00:06 GMT Lines: 23