Ralf Hautkappe wrote:
> 
> thx for help!
> 
> i tried <number but as you said it works only for unsigned integers.....

A little nicer, but non-standard:

s>number? ( addr u -- d f ) \ gforth
    \G converts string addr u into d, flag indicates success

s>unumber? ( addr u -- ud flag ) \ gforth
    \G converts string addr u into ud, flag indicates success

> i tried s" 
> -097" evaluate this mornig... and it works realy fine.... it was much too 
> easy.... ;)

However, it's not very useful if you do not know for sure that the
string is text-interpreted as a single-precision integer.

> btw... maybe the gforth handbook should contain more of such simple tasks for 
> newcomers.... though i think theres a time problem for the people who writes 
> this stuff.....

Maybe you would want to write this stuff.

> but theres another problem i have.... i have now written severall 
> applicatrions with gforth... mostly for printing (kacheln, bookcovers, 
> personalized terminplanners ready for duplex printing, binding..) or 
> controlling of printers (building printjobs getting information of the 
> printer like coloruseage, costs...) i would like to share them with 
> others.... but i dont know how to write an installation routine so they will 
> run on every linux system with gforth installed....

You could make the source files executable, and start them with

#! /usr/bin/env gforth

Or alternatively make a shell script that calls Gforth with your Forth
source file(s).

For distribution you could just make it a tar-ball, with a Makefile
that has an "install" target, and leave it to the users to install it,
and eventually to the distributors to package it up for their
installation.

- anton

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to