🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

4 total messages Started by Clayton Cramer Tue, 07 Oct 1986 19:30
Microsoft C V3.0 -> 4.0 Incompatibility
#8192
Author: Clayton Cramer
Date: Tue, 07 Oct 1986 19:30
35 lines
1562 bytes
I recently recompiled a program under Microsoft C V4.0 and found the
program worked a little differently.  Under V3.0, a command line
argument of the form:

	/"This is a test string"
        
generated arguments like:

	Argv[1] = /"This
        Argv[2] = is
        Argv[3] = a
        Argv[4] = test
        Argv[5] = string"
        
This was not quite what I expected -- the manual indicated (at least
as I understood it) that I should get:

	Argv[1] = /This is a test string
        
But I worked around the apparent bug in V3.0.

Under V4.0, my program didn't worked the same.  My first suspicion
was that Microsoft actually fixed the bug.  What I get now, though, is

	Argv[1] = /This
        Argv[2] = is
        Argv[3] = a
        Argv[4] = test
        Argv[5] = string

which isn't right either, and caused my program some problems when
it tried to find the closing double quote.  I changed my program to
expect single quotes, and these are passed through without alteration.

Clayton E. Cramer
Re: Microsoft C V3.0 -> 4.0 Incompatibility
#8260
Author: 8870x138
Date: Mon, 13 Oct 1986 19:22
28 lines
1151 bytes
One other major difference is the rename library call.  The arguments are
reversed from V3.0 to V4.0:

OLD FORM( V3.0)		rename (newname, oldname)

NEW FORM( V4.0)		rename (oldname, newname)

Also the compiler will give warning messages if you have #endif statements
which is followed by some text:

#ifdef foo


#endif	foo

The old compiler would accept this.


___________________________________________________________________

Disclaimers on file.



Bill Pittore
Sun Microsystems  1 Cranberry Hill, Lexington, MA 02173

{decwrl || ihnp4 || seismo || !sun!suneast!pizza!billp}
Re: Microsoft C V3.0 -> 4.0 Incompatibility
#8263
Author: John M Sellens
Date: Wed, 15 Oct 1986 03:16
2 lines
702 bytes
Of course, you could always look in the manual for the list of
differences (yes - it is there).
Re: Microsoft C V3.0 -> 4.0 Incompatibility
#8704
Author: Guido van Rossum
Date: Sat, 01 Nov 1986 16:30
20 lines
1604 bytes
In article <3@suneast.uucp> billp@suneast.uucp (8870x138) writes:
>One other major difference is the rename library call.  The arguments are
>reversed from V3.0 to V4.0:

And so it should be.  "Rename" is in the proposed ANSI C library, and
also a BSD system call; MSC 3.0 had the arguments reversed with respect
to these, probably because they didn't look carefully at their examples
(in general, I am very pleased with their Unix compatibility -- it makes
porting software painless).

>Also the compiler will give warning messages if you have #endif statements
>which is followed by some text.

While I don't like this change as much as the previous one, this, too,
is compatible with ANSI C (but not with common practice on Unix -- I
believe there was a battle over this in the ANSI C committee which was
lost by the Unix peoples).  At least it is a warning, not an error, so
you can take your time fixing this.
-- 
	Guido van Rossum, CWI, Amsterdam <guido@mcvax.UUCP>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads