OK guys, this is my first real attempt at VB. Actually my return to writing
programs since 1998. I've got an old DOS QB app that I am converting to VB
6.0. Really simple file formatting app.
the INPUT statement is behaving oddly. Picture a CSV file that looks like
this
Bill smith,123 Main St,Apt 3
and input statement like this:
Dim nm, ad1, ad2 as String
Input #filehandle, nm, ad1, ad2
What happens is that VB read the address value but only the numeric part
then puts the rest in the ad2 variable. So AD1 is now "123" and AD2 is
"Main St"
What am I doing wrong?
Paul 9 3872
Inline :-
On Sun, 20 Nov 2005 06:01:16 GMT, "Paul M. Cook"
<pm******************@gte.net> wrote: OK guys, this is my first real attempt at VB. Actually my return to writing programs since 1998. I've got an old DOS QB app that I am converting to VB 6.0. Really simple file formatting app.
the INPUT statement is behaving oddly. Picture a CSV file that looks like this
Bill smith,123 Main St,Apt 3
and input statement like this:
Dim nm, ad1, ad2 as String
\___ this declares two Variants then one String
Input #filehandle, nm, ad1, ad2
What happens is that VB read the address value but only the numeric part then puts the rest in the ad2 variable. So AD1 is now "123" and AD2 is "Main St"
What am I doing wrong?
Paul
"Paul M. Cook" <pm******************@gte.net> skrev i en meddelelse
news:MiUff.2040$Vu2.369@trnddc06... OK guys, this is my first real attempt at VB. Actually my return to writing programs since 1998. I've got an old DOS QB app that I am converting to VB 6.0. Really simple file formatting app.
the INPUT statement is behaving oddly. Picture a CSV file that looks like this
Bill smith,123 Main St,Apt 3
and input statement like this:
Dim nm, ad1, ad2 as String
WRONG!!
Do like this:
Dim nm As String,ad1 As String,ad2 As String
Even better, make you code neat for easier reference:
Dim nm As String
Dim ad1 As String
Dim ad2 As String
- Kev
"StoneWare" <He*******@NoSpam.Net> wrote in message
news:43**********************@dread11.news.tele.dk ... "Paul M. Cook" <pm******************@gte.net> skrev i en meddelelse news:MiUff.2040$Vu2.369@trnddc06... OK guys, this is my first real attempt at VB. Actually my return to writing programs since 1998. I've got an old DOS QB app that I am converting to VB 6.0. Really simple file formatting app.
the INPUT statement is behaving oddly. Picture a CSV file that looks like this
Bill smith,123 Main St,Apt 3
and input statement like this:
Dim nm, ad1, ad2 as String WRONG!!
Do like this: Dim nm As String,ad1 As String,ad2 As String
"StoneWare" <He*******@NoSpam.Net> wrote in message
news:43**********************@dread11.news.tele.dk ... "Paul M. Cook" <pm******************@gte.net> skrev i en meddelelse news:MiUff.2040$Vu2.369@trnddc06... OK guys, this is my first real attempt at VB. Actually my return to writing programs since 1998. I've got an old DOS QB app that I am converting to VB 6.0. Really simple file formatting app.
the INPUT statement is behaving oddly. Picture a CSV file that looks
like this
Bill smith,123 Main St,Apt 3
and input statement like this:
Dim nm, ad1, ad2 as String WRONG!!
Do like this: Dim nm As String,ad1 As String,ad2 As String
Well yes, it was wrong. Which is why I came here :) Thanks guys. I'm
flying without a manual here so wish me luck.
Paul
On Mon, 21 Nov 2005 02:00:17 GMT, "Paul M. Cook"
<pm******************@gte.net> wrote:
<snip> Do like this: Dim nm As String,ad1 As String,ad2 As String
Well yes, it was wrong. Which is why I came here :) Thanks guys. I'm flying without a manual here so wish me luck.
Do you have any form of Help System ?
If not I have a backup of the VB5 Help File at: www.jerryfrench.co.uk/utils/vb5help.zip
VB5 is pretty much the same as VB6, although VB6 has a few more bells
and whistles
"J French" <er*****@nowhere.uk> wrote in message
news:43****************@news.btopenworld.com... On Mon, 21 Nov 2005 02:00:17 GMT, "Paul M. Cook" <pm******************@gte.net> wrote:
<snip>
Do like this: Dim nm As String,ad1 As String,ad2 As String
Well yes, it was wrong. Which is why I came here :) Thanks guys. I'm flying without a manual here so wish me luck.
Do you have any form of Help System ?
If not I have a backup of the VB5 Help File at:
www.jerryfrench.co.uk/utils/vb5help.zip
VB5 is pretty much the same as VB6, although VB6 has a few more bells and whistles
I have VB 6 but I lost the MSDN CD with the help file. I'll try the one you
linked too. Thank you.
Paul
On Mon, 21 Nov 2005 19:28:21 GMT, "Paul M. Cook"
<pm******************@gte.net> wrote:
<snip> VB5 is pretty much the same as VB6, although VB6 has a few more bells and whistles
I have VB 6 but I lost the MSDN CD with the help file. I'll try the one you linked too. Thank you.
You can regard the VB6 Help File as a VB6 Help File that is missing a
few items
- some people prefer it to MSDN
"J French" <er*****@nowhere.uk> wrote in message
news:43****************@news.btopenworld.com... On Mon, 21 Nov 2005 19:28:21 GMT, "Paul M. Cook" <pm******************@gte.net> wrote:
You can regard the VB6 Help File as a VB6 Help File that is missing a few items
Was that a Freudian slip? :)
On Tue, 22 Nov 2005 18:28:04 -0800, "Steve Gerrard"
<my********@comcast.net> wrote: "J French" <er*****@nowhere.uk> wrote in message news:43****************@news.btopenworld.com... On Mon, 21 Nov 2005 19:28:21 GMT, "Paul M. Cook" <pm******************@gte.net> wrote:
You can regard the VB6 Help File as a VB6 Help File that is missing a few items
Was that a Freudian slip? :)
Nuts ! <g> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Jeff Homan |
last post by:
Hello,
I don't know where to begin with this as it's kind of a strange error
and I can't figure it out. I've got a form that I pass several
variables to a php page. One of the variables is a...
|
by: Michael Bosco |
last post by:
Hi. I am fairly new to ASP. I have to build a website in ASP 3 that
interfaces with VB 6 dll's. I've noticed some strange behavior, so I
devised the following tests. Here's my test VB 6...
|
by: jagmeena |
last post by:
Hello,
I am sure this problem has been addressed before, however, I could'nt get a
suitable solution to my problem. Hence I am posting here. Thanks a lot for
all your help.
The code I have is
...
|
by: Marlene Stebbins |
last post by:
Something very strange is going on here. I don't know if it's a C
problem or an implementation problem. The program reads data from
a file and loads it into two arrays. When xy, x, y, *xlist and...
|
by: leonecla |
last post by:
Hi everybody,
I'm facing a very very strange problem with a very very simple C
program...
My goal should be to write to a binary file some numbers (integers),
each one represented as a sequence...
|
by: the friendly display name |
last post by:
Hi,
I have a filled multiline textbox on the site. I can scroll it with IE and
Firefox, but under Opera (tested under 7.54, and Opera 8, under "identify as
MSIE" and under Opera identification)...
|
by: John Kraft |
last post by:
Hello all,
I'm experiencing some, imo, strange behavior with the StreamReader
object I am using in the code below. Summary is that I am downloading
a file from a website and saving it to disk...
|
by: danep2 |
last post by:
Hello all
This is a really strange problem. I have code that performs a few
calculations based on input from a joystick, and writes these values
to a file using basically the following code:
...
|
by: Pilcrow |
last post by:
This behavior seems very strange to me, but I imagine that someone will
be able to 'explain' it in terms of the famous C standard.
-------------------- code -----------------------------------...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |