Go to Post Watch out, guys, Lisa's coming.... worse than any hurricane or tornado you can imagine! - KathieK [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 27-12-2005, 13:36
complete's Avatar
complete complete is offline
Registered User
no team
 
Join Date: Dec 2005
Location: Saint Louis
Posts: 6
complete is an unknown quantity at this point
reading negative numbers from a file in VB

So far the code I have written can read and write to and from a file.

In other words, I have the
Code:
    Line Input  #FileNum...
and the
Code:
     Write #FileNum...
written.

But how do I handel a situation where the file has negative numbers to be read? I am able to output to a file a negative integer. But when I try to read it back I get an error.
I assume I will have to read each line of the file one by one into a string and then have it converted. What are the string conversion routines in VB? The line of code is written as

-1

I suppose I have to do some string manipulation to get it stored back as a negative integer.
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Negative numbers? Calvin Programming 6 09-02-2005 10:46
Error in header file p18f8520.h !!! RbtGal1351 Programming 3 17-01-2005 16:03
heres the code. y this not working omega Programming 16 31-03-2004 15:18
File Sharing and Revision Tracking Madison FIRST-related Organizations 14 04-06-2003 18:01


All times are GMT -5. The time now is 22:01.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi