www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/02/10/12:18:59

From: "Eric" <ericfingerhut AT mindspring DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: unable to assign or initialize variables - HELP
Date: Tue, 10 Feb 1998 12:01:36 -0500
Organization: MindSpring Enterprises
Lines: 42
Message-ID: <6bq161$el6@camel18.mindspring.com>
NNTP-Posting-Host: ip203.garden-city4.ny.pub-ip.psi.net
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

The following line:
    scanf("%d-%d-%d-%c", &beg_X, &end_Y, &wColor, &ch);

will NOT assign a value to the first variable (&beg_X) and it remains at
zero. BUT IF I FLIP the order of the first two variable (ie,
scanf("%d-%d-%d-%c", &end_Y, &beg_X, &wColor, &ch);), VALUES ARE ASSIGNED!

In a similar vein, the following line:
    WORD left = 8, top = 10, right = 50, bottom = 20, type;

will properly initialize evry requested variable of type word EXCEPT FOR THE
last one (bottom = 20). I had to reassign the value later in the code.

I'm using RHIDE on a Windows 95 machine. Any help much appreciated.




begin 666 ATT00066.gif
M1TE&.#EA% `4`/<``/______S/__F?__9O__,___`/_,___,S/_,F?_,9O_,
M,__,`/^9__^9S/^9F?^99O^9,_^9`/]F__]FS/]FF?]F9O]F,_]F`/\S__\S
MS/\SF?\S9O\S,_\S`/\`__\`S/\`F?\`9O\`,_\``,S__\S_S,S_F<S_9LS_
M,\S_`,S,_\S,S,S,F<S,9LS,,\S,`,R9_\R9S,R9F<R99LR9,\R9`,QF_\QF
MS,QFF<QF9LQF,\QF`,PS_\PSS,PSF<PS9LPS,\PS`,P`_\P`S,P`F<P`9LP`
M,\P``)G__YG_S)G_F9G_9IG_,YG_`)G,_YG,S)G,F9G,9IG,,YG,`)F9_YF9
MS)F9F9F99IF9,YF9`)EF_YEFS)EFF9EF9IEF,YEF`)DS_YDSS)DSF9DS9IDS
M,YDS`)D`_YD`S)D`F9D`9ID`,YD``&;__V;_S&;_F6;_9F;_,V;_`&;,_V;,
MS&;,F6;,9F;,,V;,`&:9_V:9S&:9F6:99F:9,V:9`&9F_V9FS&9FF69F9F9F
M,V9F`&8S_V8SS&8SF68S9F8S,V8S`&8`_V8`S&8`F68`9F8`,V8``#/__S/_
MS#/_F3/_9C/_,S/_`#/,_S/,S#/,F3/,9C/,,S/,`#.9_S.9S#.9F3.99C.9
M,S.9`#-F_S-FS#-FF3-F9C-F,S-F`#,S_S,SS#,SF3,S9C,S,S,S`#,`_S,`
MS#,`F3,`9C,`,S,```#__P#_S #_F0#_9@#_,P#_``#,_P#,S #,F0#,9@#,
M,P#,``"9_P"9S "9F0"99@"9,P"9``!F_P!FS !FF0!F9@!F,P!F```S_P`S
MS `SF0`S9@`S,P`S````_P``S ``F0``9@``,P``````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````"P`````% `4`$ (0P!)"!Q(L*!!``@3*ER84"##
MAPL=0IPH<>+#BA8CDLAX<2-'C1]!AFSH<20`C"%1?E3)D65&EQ9A4BPY4B9$
'@SAS!@0`.P``
`
end

- Raw text -


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