From: Jan Kroken <jankr@ifi.uio.no>
To: zsh-workers@sunsite.auc.dk
Subject: Suggestion: c library access
Date: 16 Dec 1999 21:56:01 +0100 [thread overview]
Message-ID: <vhi7lie38ri.fsf@jormunrekk.ifi.uio.no> (raw)
I have a suggestion for a (far) future Zsh enhancement. What if you
could load libraries, and call functions from them on the command line?
Imagine the following script which uses a function float pow(float,float):
---BEGIN---
#!/bin/zsh
LIBM 0 $(((load-library libm)))
return_function c_pow (){
Y=$(((float-to-shell $(((exec-library-function $LIBM "pow" \
$(((shell-to-float $1))) \
$(((shell-to-float $2)))))))))
return Y
}
A=2.0 B=2.0
C=$(c_pow $A $B)
$(((free-library $LIBM)))
---END---
would this be an idea?
--
-jk
next reply other threads:[~1999-12-16 20:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-12-16 20:56 Jan Kroken [this message]
1999-12-16 22:08 ` Mike Fletcher
1999-12-17 9:08 Sven Wischnowsky
1999-12-20 22:23 ` Peter Stephenson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=vhi7lie38ri.fsf@jormunrekk.ifi.uio.no \
--to=jankr@ifi.uio.no \
--cc=zsh-workers@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).