www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/27/15:41:05

Hops: 0
Host: delorie.com.
Posted-Date: Mon, 27 Jan 1997 22:25:35 -0200 (GMT)
Message-Id: <199701280025.WAA16737@prometheus.hol.gr>
From: "Panos Platon Tsapralis" <pan AT hol DOT gr>
To: "D.J.Delorie" <djgpp AT delorie DOT com>
Subject: Very strange behaviour.
Date: Mon, 27 Jan 1997 22:29:19 +0200
MIME-Version: 1.0

	Dear friends,

	I have noticed a very strange behaviour during programming with DJGPP (
latest version ).

	There follows a snippet of code, that demonstrates the problem :
.
.
.
char buffer[2048];
int avar=0;
int bvar=0;
.
.

int main(void)
{
.
.
.
strcpy(buffer,"string1");
afunction(buffer,avar);
.
.
.
strcpy(buffer,"string2");
bfunction(buffer,bvar);
.
.
.
}

	Allthough the first "strcpy" is executed O.K. and the following function
call ( "afunction..." ) completes O.K. also, the second "strcpy" does
nothing to variable "buffer" and the subsequent call fails. During
debugging ( through RHIDE ), I seem to not being able to modify the content
of the variable "buffer" via Control-F4 operation.

	I have been spending countless hours trying to figure out what is really
hapening , but to no avail.

	I would really appreciate all the help I can get from you, dear fellows
!!!

=================================================
Panos Platon Tsapralis,
Software Engineer,
Software Developement Operations Division,
Unisoft S.A., Athens, Hellas.
=================================================

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019