Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Suggestion: c library access
- X-seq: zsh-workers 9091
- From: Jan Kroken <jankr@xxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Suggestion: c library access
- Date: 16 Dec 1999 21:56:01 +0100
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- Original-sender: jankr@xxxxxxxxxxxxxxx
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author