🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: bit.listserv.coco
Article #43502

More C problems

#43502
From: only_bbs!jzr
Date: Tue, 30 Nov 1993 14:59
32 lines
2087 bytes
     Still using the Kreider libs,
and having a problems:

     itoa(), while working in several spots in my code, _refuses_ to
work properly in one single spot.  At this point in the code, the
wrong ASCII string is generated, and garbage is printed on other
windows.  Is this a problem with itoa, or does it have a problem
with programs that run at the very limits of memory?  I resorted to
using sprintf(str,"%d",int);.

     atol(), only used twice.  One spot works, the other does _not_.
The same variable is accessed in both cases, and I have inserted
debugging code to the point that immediately before executed, I know
the value.  An example of the problem is that the integer 50, when
assigned via atol to a long, ends up as -129800.  Again, what's
going on here?  I resorted to using a itoa() and then
sscanf(str,"%D",long) to get the job done.

     I don't really have a complaint, since in each situation a
solution was found, but it is very aggrivating to spend hours trying
to track down a problem that isn't supposed to be there, especially
when the code is so long.

 - A. Hsiao
 ---------------------------------
 --- lizarden!jzr@xmission.com ---
 --- zog!jzr@abode.ttank.com   ---
 --- jzr@onlybbs.via.mind.org  ---
 ---------------------------------

--
via Fortress Gateway at uumind.mind.ORG
Technical Details
Message-ID: <2892119@under.mind.ORG>
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!paladin.american.edu!auvm!UNDER.MIND.ORG!only_bbs!jzr

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 110568,7171b395e2859555,start
X-Google-Attributes: gid110568,public
X-Google-ArrivalTime: 1993-12-01 01:47:11 PST
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!paladin.american.edu!auvm!UNDER.MIND.ORG!only_bbs!jzr
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
Newsgroups: bit.listserv.coco
Return-Path: <@AUVM.AMERICAN.EDU:COCO@PUCC.BITNET>
Return-Path: jzr%only_bbs.UUCP@mathcs.emory.edu
X-Mailer: Fortress v1g-76
Message-ID: <2892119@under.mind.ORG>
Date: Tue, 30 Nov 1993 09:59:00 -0500
Reply-To: only_bbs!jzr@UNDER.MIND.ORG
Sender: COCO - Tandy Color Computer List <COCO@PUCC.BITNET>
From: only_bbs!jzr@UNDER.MIND.ORG
Subject: More C problems
Lines: 31