zsh-workers
 help / color / mirror / code / Atom feed
* Re: Suggestion: c library access
@ 1999-12-17  9:08 Sven Wischnowsky
  1999-12-20 22:23 ` Peter Stephenson
  0 siblings, 1 reply; 4+ messages in thread
From: Sven Wischnowsky @ 1999-12-17  9:08 UTC (permalink / raw)
  To: zsh-workers


Jan Kroken wrote:

> 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):

Well, this special case is already handled with the mathfunc
module. Otherwise... interesting idea, are you volunteering?

This reminded me: mathfunc uses drem(), but at least the Solaris 5.6 I 
have access to here doesn't seem to have that.

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 4+ messages in thread
* Suggestion: c library access
@ 1999-12-16 20:56 Jan Kroken
  1999-12-16 22:08 ` Mike Fletcher
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Kroken @ 1999-12-16 20:56 UTC (permalink / raw)
  To: zsh-workers


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1999-12-20 22:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-12-17  9:08 Suggestion: c library access Sven Wischnowsky
1999-12-20 22:23 ` Peter Stephenson
  -- strict thread matches above, loose matches on Subject: below --
1999-12-16 20:56 Jan Kroken
1999-12-16 22:08 ` Mike Fletcher

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).