Message-ID: <002301be2b8a$37ab3180$08034ac3@oemcomputer> From: "=?iso-8859-1?Q?Veli-Pekka_Kilpel=E4inen?=" To: Subject: Variable malfunction? Date: Sat, 19 Dec 1998 22:00:18 +0200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0020_01BE2B9A.F74E14C0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3110.5 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Reply-To: djgpp AT delorie DOT com Tämä on moniosainen MIME-muotoinen viesti. ------=_NextPart_000_0020_01BE2B9A.F74E14C0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable What can be the reason when my variable is not changed in the following = code: =20 ... const double pi2 =3D 6.2831853072; ... main(){} ... void set_trigs(void) {double gr; for (int index =3D 0; index < 8192; index++) {gr =3D index / 8192 * pi2; // gr is always zero! *tr++ =3D sin(gr); *tr++ =3D cos(gr);};} ... =20 I see this in both Rhide's debugger and on screen. None of the Rhide's = optimization flags are set, so no optimization should be used(everything = else is also on default). I run Rhide at Win98 DOS mode(not prompt) and = everything else seems working. ------=_NextPart_000_0020_01BE2B9A.F74E14C0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
What can be the reason when my = variable is not=20 changed in the following code:
 
...
const double pi2 =3D=20 6.2831853072;
...
main(){}
...
void = set_trigs(void)
{double=20 gr;
for (int index =3D 0; index < 8192; index++)
 {gr =3D = index / 8192=20 * pi2;        // gr is always=20 zero!
 *tr++ =3D sin(gr);
 *tr++ =3D = cos(gr);};}
...
 
I see this in both Rhide's debugger = and on=20 screen. None of the Rhide's optimization flags are set, so no = optimization=20 should be used(everything else is also on default). I run Rhide at Win98 = DOS=20 mode(not prompt) and everything else seems=20 working.
------=_NextPart_000_0020_01BE2B9A.F74E14C0--