Re: TIB: number to string... WORKS!


[Prev][Next][Index][Thread]

Re: TIB: number to string... WORKS!




:{0,1}/->/C         ;need this..
:{A,A}/->/D         ;changes the number you want into a data 
                    ;set.
:LinR C,D           ;a linear regression of the two data
                    ;sets.  it takes the point (0,1) and
                    ;(A,A) and finds the equation of the
                    ;line between them.  You will get an
                    ;equation of something like Ax+0
                    ;(i think).
:Eq>St(ReqEq,B)     ;this changes the equation into a
                    ;string.
:sub(B,1,(lngth(B)-3))/->/B     ;this takes the string and
                    ;removes the x+0 part of it, and then
                    ;stores A into B as a string.

it is a simple, really extremely useful 



---Jeff Glover <jglover@geocities.com> wrote:
>
> 
> This is great!!!  Would you mind explain what's happening here
though.  I
> have been able to this code in my programs and plugin the varible I
need to
> use, but I'm not undetstanding how this works.
> 
> Thanks a lot, this code really is a lifesaver.
> At 01:06 PM 11/8/98 -0600, you wrote:
> >
> >I'm assuming 85/86 here. It's possible - with some trickery. I
learned this
> >when it was brought up on this mailinglist a couple years ago, and
it's
> been a
> >lifesaver in some of my programs.
> >
> >:Input A
> >:<Do things with the number here>
> >:{0,1}/->/C
> >:{A,A}/->/D
> >:LinR C,D
> >:Eq>St(ReqEq,B)
> >:sub(B,1,(lngth(B)-3))/->/B
> >
> >Now B is a string of the number A.
> >
> >-justin
> >
> >
> ------------------------------------------
> Jeff Glover
> jglover@geocities.com
> http://jglover.home.ml.org
> 

==

The Garth Johnson

Visit my website!  http://www.bigfoot.com/~garthjohnson
                "Now with jokes for your mental enjoyment!"

"Popularity, Religion, Science, Jobs, Cars, The Internet, Civilization-it's all very nice but it's we're just deluding ourselves...  Inside of every perfect postured, mild mannered person there is a teenager saying "dude! this is cool!" and sending slinkeys down upward escalators."
_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com