Mail Archives: djgpp/2001/11/19/10:07:19
From: | =?windows-1250?Q?Ladislav_Dvo=F8=E1k?= <dvorakl AT jednotacb DOT cz>
|
To: | <djgpp AT delorie DOT com>
|
Subject: | crashed when float = int / 2
|
Date: | Mon, 19 Nov 2001 16:02:34 +0100
|
Message-ID: | <NEBBLBIDCLEEIPODBKHIEEPPCCAA.dvorakl@jednotacb.cz>
|
MIME-Version: | 1.0
|
X-Priority: | 3 (Normal)
|
X-MSMail-Priority: | Normal
|
X-Mailer: | Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0)
|
Importance: | Normal
|
X-MimeOLE: | Produced By Microsoft MimeOLE V6.00.2469.0002
|
Reply-To: | djgpp AT delorie DOT com
|
This is a multi-part message in MIME format.
------=_NextPart_000_0000_01C17113.9A9296E0
Content-Type: text/plain;
charset="windows-1250"
Content-Transfer-Encoding: 7bit
Hi,
I have a application. When I run this application in Windows 95 or in DOS
(with cwsdpmi.exe), he works without problem. When I this application run on
barcode scanner Falcon 330 with ROM-DOS 6.22 and AMD Elan AM486 processor I
have this problem.
long vyhledzbo(char ean[20])
{
FILE *ciselnik;
int vpom,pozmez,prv,pzaznamu,pruchodu=18;
long kurszmm,kurszm,vpozice;
char cean[20];
float krok;
int delkavety = 102;
ciselnik = fopen("expean.txt","r");
fseek (ciselnik,-delkavety,SEEK_END);
pzaznamu = (ftell(ciselnik) / delkavety) + 1;
krok = pzaznamu / 2;
On line >krok=pzaznamu /2;< program crashed. I think, it is brought about
this : krok (is float) = pzaznamu (is int). I don't know how fix this
problem.
Thank you,
Lada
------=_NextPart_000_0000_01C17113.9A9296E0
Content-Type: text/html;
charset="windows-1250"
Content-Transfer-Encoding: quoted-printable
<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns=3D"http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dwindows-1250">
<meta name=3DProgId content=3DWord.Document>
<meta name=3DGenerator content=3D"Microsoft Word 9">
<meta name=3DOriginator content=3D"Microsoft Word 9">
<link rel=3DFile-List href=3D"cid:filelist DOT xml AT 01C17113 DOT 97B19700">
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:DoNotRelyOnCSS/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:DocumentKind>DocumentEmail</w:DocumentKind>
<w:HyphenationZone>21</w:HyphenationZone>
<w:EnvelopeVis/>
</w:WordDocument>
</xml><![endif]-->
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0cm;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
p.MsoAutoSig, li.MsoAutoSig, div.MsoAutoSig
{margin:0cm;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
span.StylZprvyElektronickPoty15
{mso-style-type:personal-compose;
mso-ansi-font-size:10.0pt;
mso-ascii-font-family:Arial;
mso-hansi-font-family:Arial;
mso-bidi-font-family:Arial;
color:black;}
@page Section1
{size:595.3pt 841.9pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;
mso-header-margin:35.4pt;
mso-footer-margin:35.4pt;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=3DCS style=3D'tab-interval:35.4pt'>
<div class=3DSection1>
<p class=3DMsoNormal><font size=3D3 color=3Dblack face=3D"Times New =
Roman"><span
style=3D'font-size:12.0pt;color:black'>Hi,<br>
I have a application. When I run this application in Windows 95 or in =
DOS<br>
(with cwsdpmi.exe), he works without problem. When I this application =
run on<br>
barcode scanner Falcon 330 with ROM-DOS 6.22 and AMD Elan AM486 =
processor I<br>
have this problem.<br>
<br>
long vyhledzbo(char ean[20])<br>
{<br>
FILE *ciselnik;<br>
int vpom,pozmez,prv,pzaznamu,pruchodu=3D18;<br>
long kurszmm,kurszm,vpozice;<br>
char cean[20];<br>
float krok;<br>
int delkavety =3D 102;<br>
ciselnik =3D fopen("expean.txt","r");<br>
fseek (ciselnik,-delkavety,SEEK_END);<br>
pzaznamu =3D (ftell(ciselnik) / delkavety) + 1;<br>
krok =3D pzaznamu / 2;<br>
<br>
On line >krok=3Dpzaznamu /2;< program crashed. I think, it is =
brought about<br>
this : krok (is float) =3D pzaznamu (is int). I don't know how fix =
this<br>
problem.<br>
<br>
Thank you,<br>
<br>
Lada</span></font><span class=3DStylZprvyElektronickPoty15><font =
size=3D2
color=3Dblack face=3DArial><span =
style=3D'font-size:10.0pt;mso-bidi-font-size:12.0pt;
font-family:Arial'><o:p></o:p></span></font></span></p>
</div>
</body>
</html>
------=_NextPart_000_0000_01C17113.9A9296E0--
- Raw text -