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 Misc > Re: pascal equi...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 30 of 38 Topic 791 of 814
Post > Topic >>

Re: pascal equivalent of python "sleep"

by thomas.mertes@[EMAIL PROTECTED] May 9, 2008 at 08:24 AM

On 8 Mai, 22:06, Marco van de Voort <mar...@[EMAIL PROTECTED]
> wrote:
> On 2008-05-08, thomas.mer...@[EMAIL PROTECTED]
 <thomas.mer...@[EMAIL PROTECTED]
> wrote:
>
> >> > standard Pascal. The area covered by the standard C library
> >> > is IMHO also a little bit bigger.
>
> >> Maybe. I never counted both, but the difference is not even close as
a basis
> >> for C's "****tability".
>
> > That is one opinion, but not my opinion.
> > I suggest your talk about that with people who know
> > both languages and their libraries inside out.
>
> Well, I base myself on K & R (appendix C of the 2nd edition to be
exact).

That is a good C reference. For a ****table Pascal the ISO 7185
Pascal (available here: http://www.standardpascal.org/iso7185.html)
minus the things that are not available under Borland Pascal/Delphi
must be used (this is descibed as answer to "Is it possible to write
in a Pascal subset that will be acceptable to both ISO 7185 Pascal
and Delphi?" here: http://www.standardpascal.org/pascalfaq.html)

> I count 100 calls tops (and that includes some limit constants). Aside
> from basic file I/O (which is the roughly the same subset in Pascal)

Well not exactly. What about 'remove', 'rename', 'fseek', 'ftell'?
AFAICS ISO 7185 Pascal does not contain something equivalent.
The string functions of string.h are ugly but better than nothing.
In ISO 7185 Pascal I did not find string functions at all (I know
that the type 'string' is common in various Pascal dialects, but
AFAICS there is none in the standard. The include file math.h
contains more trigonometric functions than standard Pascal.
What about rand, malloc, realloc, getenv, bsearch, qsort.
I am sure that there are similar functions available in every
dialect of Pascal, but seemingly not in the standard. The functions
setjmp and longjmp can be used to emulate an exception handling
that is missing in C and standard Pascal. You already mentioned
signal.h and time.h which can also be useful.

> I count gettime, system() and signal as the other OS wrapping
> functions (of which signal is not implemented on non Unices, or
> only for runtime internal exceptions)

At least under windows the signal handling is present.
Additionally many POSIX functions are ****ted to different
operating systems as well (Ok, they are not granted to be
available, but the probability to find them is not zero
and they usually use a C interface).

> I couldn't do the same quickly for pascal, but my guestimate would be
40-50
> calls (built-ins inclusive). So it boils all down to gettime, system and
> signal?

Not really as shown above.
BTW. A quick look at the Seed7 do***entation of the predefined
types (at: http://seed7.sourceforge.net/manual/types.htm)
revealed that they define

 100 operators (like + - * / div, rem, mdiv, mod, and, or, not)
  84 relations (like < > <= >= = <>)
 192 functions (like pred, succ, abs, atan2, compare, hashCode)
  79 statements and procedures (like read, write, for)
  19 assignment statements ( := )

For this list I examined only the types
boolean, integer, bigInteger, rational, bigRational, float, char,
string, array, hash, set, struct, ptr, enumeration, color, time
duration, file and text.
I did not take into account other stuff like
reflection, graphics, scanner, charsets, directory,
file management and more.
Compared to standard C and standard Pascal the size of the Seed7
library is not bad (But there is still much room for improvement).

> >> In some form or the other, if you interface or emulate them yes.
However it
> >> doesn't matter if you do that from C or Pascal.
>
> > As I explaind already, my critical points about Pascal's
> > ****tability start with the language itself (else/otherwise
> > clause for case statements,
>
> That is a dialect question, not ****tability. And it is not that strange
in C
> land either (mixing prototypes with original K&R C, dialects that
consider
> void * compatible with any pointer, vs the ones that still use char *
for
> that)
>
> > file buffer variables
>
> What exactly?

I was speaking of f^ and the procedures 'get' and 'put' which are
AFAIK not present under Delphi.

> > OTOH in C there are not such
> > issues (as long as you refrain from using Microsofts (and others)
> > extensions).
>
> Well, see above. C hasn't been constant in the history also. The MS
> extensions are often just that, pre-standard implementations that
deviate
> from the final standard.
>
> > IMHO avoiding extensions of the language in C is easy while
> > in Pascal it is sometimes unavoidable.
>
> You point to few original sources or own research for that conclusion.
You
> might be right, but I don't have the information to reach the same
> conclusion.

I hope that there are more links to original sources this time.

Greetings Thomas Mertes

Seed7 Homepage:  http://seed7.sourceforge.net
Seed7 - The extensible programming language: User defined statements
and operators, abstract data types, templates without special
syntax, OO with interfaces and multiple dispatch, statically typed,
interpreted or compiled, ****table, runs under linux/unix/windows.
 




 38 Posts in Topic:
pascal equivalent of python "sleep"
Sean McIlroy <sean_mci  2008-05-07 16:42:05 
Re: pascal equivalent of python "sleep"
CBFalconer <cbfalconer  2008-05-07 20:38:32 
Re: pascal equivalent of python "sleep"
Sean McIlroy <sean_mci  2008-05-07 19:39:20 
Re: pascal equivalent of python "sleep"
Martin Liddle <news09@  2008-05-08 06:55:04 
Re: pascal equivalent of python "sleep"
thomas.mertes@[EMAIL PROT  2008-05-08 05:58:47 
Re: pascal equivalent of python "sleep"
Marco van de Voort <ma  2008-05-08 13:19:46 
Re: pascal equivalent of python "sleep"
Scott Moore <samiam@[E  2008-05-08 07:55:32 
Re: pascal equivalent of python "sleep"
thomas.mertes@[EMAIL PROT  2008-05-08 08:07:24 
Re: pascal equivalent of python "sleep"
Marco van de Voort <ma  2008-05-08 15:34:45 
Re: pascal equivalent of python "sleep"
Scott Moore <samiam@[E  2008-05-08 08:08:54 
Re: pascal equivalent of python "sleep"
Marco van de Voort <ma  2008-05-08 17:52:47 
Re: pascal equivalent of python "sleep"
Scott Moore <samiam@[E  2008-05-08 14:06:56 
Re: pascal equivalent of python "sleep"
Marco van de Voort <ma  2008-05-09 20:18:09 
Re: pascal equivalent of python "sleep"
Waldek Hebisch <hebisc  2008-05-09 21:34:21 
Re: pascal equivalent of python "sleep"
Marco van de Voort <ma  2008-05-10 19:08:38 
Re: pascal equivalent of python "sleep"
thomas.mertes@[EMAIL PROT  2008-05-08 10:05:23 
Re: pascal equivalent of python "sleep"
Marco van de Voort <ma  2008-05-08 18:09:24 
Re: pascal equivalent of python "sleep"
thomas.mertes@[EMAIL PROT  2008-05-08 10:33:23 
Re: pascal equivalent of python "sleep"
Marco van de Voort <ma  2008-05-08 18:11:21 
Re: pascal equivalent of python "sleep"
Scott Moore <samiam@[E  2008-05-08 13:40:02 
Re: pascal equivalent of python "sleep"
Marco van de Voort <ma  2008-05-12 12:18:59 
Re: pascal equivalent of python "sleep"
thomas.mertes@[EMAIL PROT  2008-05-08 10:36:35 
Re: pascal equivalent of python "sleep"
Marco van de Voort <ma  2008-05-09 19:58:23 
Re: pascal equivalent of python "sleep"
thomas.mertes@[EMAIL PROT  2008-05-08 11:51:40 
Re: pascal equivalent of python "sleep"
thomas.mertes@[EMAIL PROT  2008-05-08 12:17:12 
Re: pascal equivalent of python "sleep"
Marco van de Voort <ma  2008-05-08 20:06:32 
Re: pascal equivalent of python "sleep"
CBFalconer <cbfalconer  2008-05-08 18:22:22 
Re: pascal equivalent of python "sleep"
CBFalconer <cbfalconer  2008-05-08 18:29:11 
Re: pascal equivalent of python "sleep"
CBFalconer <cbfalconer  2008-05-08 19:23:17 
Re: pascal equivalent of python "sleep"
thomas.mertes@[EMAIL PROT  2008-05-09 08:24:33 
Re: pascal equivalent of python "sleep"
Scott Moore <samiam@[E  2008-05-09 10:47:57 
Re: pascal equivalent of python "sleep"
Marco van de Voort <ma  2008-05-09 19:55:35 
Re: pascal equivalent of python "sleep"
Marco van de Voort <ma  2008-05-09 20:08:19 
Re: pascal equivalent of python "sleep"
Florian.Klaempfl@[EMAIL P  2008-05-09 10:43:38 
Re: pascal equivalent of python "sleep"
thomas.mertes@[EMAIL PROT  2008-05-09 13:28:37 
Re: pascal equivalent of python "sleep"
Florian.Klaempfl@[EMAIL P  2008-05-09 13:45:58 
Re: pascal equivalent of python "sleep"
thomas.mertes@[EMAIL PROT  2008-05-09 13:52:25 
Re: pascal equivalent of python "sleep"
thomas.mertes@[EMAIL PROT  2008-05-09 14:11:13 

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 Sep 5 12:25:40 CDT 2008.