Talk About Network

Google


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 > Pascal Ansi -iso > Re: String Theo...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 11 of 16 Topic 151 of 215
Post > Topic >>

Re: String Theory

by Marco van de Voort <marcov@[EMAIL PROTECTED] > Apr 8, 2005 at 08:08 PM

On 2005-04-08, Scott Moore <scott.moore6@[EMAIL PROTECTED]
> wrote:
> Andy Ball wrote:
>> 
>> Hello,
>> 
>> My Pascal book is very old, and makes no mention of string
>> datatypes other than an 'array of char'.  Were strings part
>> of ISO Pascal?  What string-related functions were included?
>> 
>> Thanks,
>>   - Andy Ball.
>
> Neither Wirths original Pascal language, nor ISO 7185 included what
> you are referring to as "string" functions, which are actually more
> correctly defined as "Basic language string functions".

I don't see this. Basics are typically interpreted, and so are their
string types. The pascal dialects strings aren't. Later standards even
got one (though based on schemata)

> The language C/C++ does not have string functions either, to this day.

C++ STL has a string base class.

> A Basic mode string is a relatively expensive data structure, and often
> the same character handling can be done with a simple array of
characters.
> You can use an array of characters to build up essentially the same
> complexity as Basic strings, so you are effectively losing little.

Could you explain why UCSD strings are more expensive than the standard
pascal construct? Specially since retrieving the length (which is needed
in
nearly every string routine) is a lot cheaper, than either in padded or
zero
terminated form?

> Adding Basic strings to Pascal was done in UCSD Pascal in the 1970's.
> It was certainly a popular feature. However, the positioning of
> Pascal as a Pascal+Basic amalgamation certainly didn't help the
> image of Pascal as being a professional programmers language.

I never in 17 years of TP heard a relation between TP strings and Basic.
You are
the first to make that connection, and to my knowledge the only one.

> C never had strings built in, and there have been few complaints,
> mostly I suspect because the average C programmer is capable of making
> his/her own string handling functions.

And causes horrible bufferoverflows in the process.
 




 16 Posts in Topic:
String Theory
Andy Ball <null@[EMAIL  2005-04-08 15:50:46 
Re: String Theory
CBFalconer <cbfalconer  2005-04-08 16:51:02 
Re: String Theory
John Reagan <john.reag  2005-04-08 18:40:36 
Re: String Theory
Scott Moore <scott.moo  2005-04-08 11:16:03 
Re: String Theory
Andy Ball <null@[EMAIL  2005-04-08 19:30:09 
Re: String Theory
Scott Moore <scott.moo  2005-04-08 13:02:50 
Re: String Theory
Frank Heckenbach <fran  2005-04-12 12:59:17 
Re: String Theory
Marco van de Voort <ma  2005-04-12 13:20:10 
Re: String Theory
Frank Heckenbach <fran  2005-04-19 11:12:47 
Re: String Theory
Marco van de Voort <ma  2005-04-19 11:39:25 
Re: String Theory
Marco van de Voort <ma  2005-04-08 20:08:40 
Re: String Theory
CBFalconer <cbfalconer  2005-04-08 21:49:56 
Re: String Theory
Marco van de Voort <ma  2005-04-09 09:10:49 
Re: String Theory
CBFalconer <cbfalconer  2005-04-09 12:12:06 
Re: String Theory
Dave Thompson <david.t  2005-04-18 05:08:13 
Re: String Theory
Marco van de Voort <ma  2005-04-18 07:36:49 

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 Jul 25 18:22:57 CDT 2008.