Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Forth > Re: f. to strin...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 15 of 17 Topic 3979 of 4053
Post > Topic >>

Re: f. to string?

by Bruce McFarling <agila61@[EMAIL PROTECTED] > Mar 31, 2008 at 08:38 PM

On Apr 1, 12:00 am, "Ed" <nos...@[EMAIL PROTECTED]
> wrote:
> "Bruce McFarling" <agil...@[EMAIL PROTECTED]
> wrote in message

>
news:e5b38da9-e193-4b4a-9fb3-0363cbb29cbf@[EMAIL PROTECTED]
> > On Mar 30, 9:02 pm, "Ed" <nos...@[EMAIL PROTECTED]
> wrote:
> > > It requires apps allocate a minimum buffer size of 
MAX-FLOAT-DIGITS.
> > > In practice most apps and forths already meet that.  Apps that
dynamically
> > > ALLOCATE the buffer should ask for  ( n ) MAX-FLOAT-DIGITS MAX
chars.

> > OK, so the main pitfall is an application that assumes that MAX-FLOAT-
> > DIGITS is smaller than it actually is for the system it is running on,
> > normally because the actual MAX-FLOAT-DIGITS was smaller in the
> > testbed system, so that REPRESENT overflows the buffer.

> MAX-FLOAT-DIGITS is a system constant and it's there to let
> applications know how much buffer space to allocate.  If an app
> assumes a value then it isn't portable and suffers the consequences.

I think there is static on the line here. I meant, the main pitfall
in the existing _status quo_, without the value of MAX-FLOAT-DIGITS
available as an environment query.

The argument of the proposal being, I took it, that lacking
``MAX-FLOAT-DIGITS'' and with the range of permitted Forth-94
semantics for ``REPRESENT'', the effort to write a portable app
is subject to a range of pitfalls.

> The sample apps in the document show how to write a function
> using REPRESENT portably.

> > And given an environment query for MAX-FLOAT-DIGITS, that can be
> > patched, pending a rewrite of the source, by performing the REPRESENT
> > in a local buffer and then copying the appropriate contents into the
> > buffer handed by the application.

> Patching MAX-FLOAT-DIGITS is outside the scope of spec,
> however implementers who understand the consequences and
> ensure REPRESENT takes into account any changes, are free
> to do so.

That was not from an implementers perspective, and not referring
to patching MAX-FLOAT-DIGITS. It was referring to source that
is written without the proposed system, and applying a patch with
a prelude file that is written using the information provided by
the proposal, including the information returned by
MAX-FLOAT-DIGITS.




 17 Posts in Topic:
f. to string?
Frank Buss <fb@[EMAIL   2008-03-29 14:22:05 
Re: f. to string?
Helmar <helmwo@[EMAIL   2008-03-29 06:26:31 
Re: f. to string?
Bruce McFarling <agila  2008-03-29 09:22:10 
Re: f. to string?
anton@[EMAIL PROTECTED]   2008-03-29 20:15:50 
Re: f. to string?
Bruce McFarling <agila  2008-03-29 17:00:03 
Re: f. to string?
"Ed" <nospam  2008-03-30 15:11:45 
Re: f. to string?
anton@[EMAIL PROTECTED]   2008-03-30 19:01:29 
Re: f. to string?
Bruce McFarling <agila  2008-03-29 22:50:53 
Re: f. to string?
Bruce McFarling <agila  2008-03-30 15:30:42 
Re: f. to string?
"Ed" <nospam  2008-03-30 15:02:22 
Re: f. to string?
Bruce McFarling <agila  2008-03-29 22:19:43 
Re: f. to string?
"Ed" <nospam  2008-03-31 11:02:54 
Re: f. to string?
Bruce McFarling <agila  2008-03-30 17:49:38 
Re: f. to string?
"Ed" <nospam  2008-04-01 14:00:42 
Re: f. to string?
Bruce McFarling <agila  2008-03-31 20:38:09 
Re: f. to string?
"Ed" <nospam  2008-04-04 17:53:28 
Re: f. to string?
Bruce McFarling <agila  2008-04-04 11:10:00 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri May 16 8:54:45 CDT 2008.