www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/09/02/07:45:22

From: jdominy AT saturn DOT cs DOT unp DOT ac DOT za (James Dominy)
Newsgroups: comp.os.msdos.djgpp
Subject: Strange results from printf()
Date: 2 Sep 1998 11:26:12 GMT
Organization: CS and IS, Univ of Natal, PMB
Lines: 20
Message-ID: <904735570.503897@mars.cs.unp.ac.za>
NNTP-Posting-Host: raven.und.ac.za
Cache-Post-Path: mars.cs.unp.ac.za!jdominy AT saturn DOT cs DOT unp DOT ac DOT za
Cache-Post-Path: Raven!news AT mars DOT cs DOT unp DOT ac DOT za
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hi there,

I seem to be getting strange results from printf() ...

I'm calling printf() with two arguments like so :

printf("SoundBlaster DSP version %i.%i",sb_dsp_major,sb_dsp_minor);

I have a SB16 DSP ver 4.13 and the line prints out this correctly either,
after I've run my program at least once since the last reboot, OR if I'm
debugging (stepping through these exact lines) in RHIDE. If this is not the
case printf() seems to be reversing the variables, ie. I appear to have SB
DSP ver 13.4 . The variables (sb_dsp_xxxxx) are correct when I debug, and so
I assume they are correct when I don't, so the prob seems to be in the
printf() function itself.

Any ideas?

Thanx
JAmes

- Raw text -


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