SCOUG Logo


Next Meeting: Sat, TBD
Meeting Directions


Be a Member
Join SCOUG

Navigation:


Help with Searching

20 Most Recent Documents
Search Archives
Index by date, title, author, category.


Features:

Mr. Know-It-All
Ink
Download!










SCOUG:

Home

Email Lists

SIGs (Internet, General Interest, Programming, Network, more..)

Online Chats

Business

Past Presentations

Credits

Submissions

Contact SCOUG

Copyright SCOUG



warp expowest
Pictures from Sept. 1999

The views expressed in articles on this site are those of their authors.

warptech
SCOUG was there!


Copyright 1998-2024, Southern California OS/2 User Group. ALL RIGHTS RESERVED.

SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group. OS/2, Workplace Shell, and IBM are registered trademarks of International Business Machines Corporation. All other trademarks remain the property of their respective owners.

The Southern California OS/2 User Group
USA

SCOUG-HELP Mailing List Archives

Return to [ 09 | February | 2002 ]

<< Previous Message << >> Next Message >>


Date: Sat, 9 Feb 2002 17:49:18 PST7
From: Harry Chris Motin <hmotin@attglobal.net >
Reply-To: scoug-help@scoug.com
To: SCOUG Help <scoug-help@scoug.com >
Subject: SCOUG-Help: Mofe WATCOM Fun

Content Type: text/plain

=====================================================
If you are responding to someone asking for help who
may not be a member of this list, be sure to use the
REPLY TO ALL feature of your email program.
=====================================================

I'm trying to create a few new programs, using Watcom C/C++. I am
immediately running into a problem (the simple little source code file,
below, illustrates it).

When I try to make a source file with an array variable that will
contain a string, the compiler tells me that I have a variable type
mismatch. Directly below, please find a copy a small test source file,
which I am trying to compile and run:

_____________________________________________________________________________________
/*Begin include statements*/
#include
#include
/*End include statements*/

char ReadFileName;
ReadFileName = "Harry";

main()
{
printf("\n The value of the variable, ReadFileName, is: %s",
ReadFileName);
return(0);
}
_____________________________________________________________________________________

Line #7 has the declaration for the variable, "ReadFileName". In line #8
I attempt to initialize it to "Harry". The compiler, however, tells me
that there is a variable type mismatch (see the output from the error
log, directly below):

_____________________________________________________________________________________
test.c(8): Error! E1129: Type does not agree with previous definition of
'ReadFileName'
test.c(8): Warning! W102: Type mismatch (warning)
_____________________________________________________________________________________

If I change line #7 to: "int ReadFileName;" and line #8 to:
"ReadFileName = 123;", it compiles and then runs OK (I also have to
change the "%s" in the printf command to "%u" because the variable is
now an integer instead of a string).

The compiler error message is almost as if Watcom does not accept the
"char" keyword as a valid variable declaration. Can anyone help me here?

HCMotin

=====================================================

To unsubscribe from this list, send an email message
to "steward@scoug.com". In the body of the message,
put the command "unsubscribe scoug-help".

For problems, contact the list owner at
"rollin@scoug.com".

=====================================================


<< Previous Message << >> Next Message >>

Return to [ 09 | February | 2002 ]



The Southern California OS/2 User Group
P.O. Box 26904
Santa Ana, CA 92799-6904, USA

Copyright 2001 the Southern California OS/2 User Group. ALL RIGHTS RESERVED.

SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group. OS/2, Workplace Shell, and IBM are registered trademarks of International Business Machines Corporation. All other trademarks remain the property of their respective owners.