By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,239 Members | 1,503 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,239 IT Pros & Developers. It's quick & easy.

declaration is too long

P: n/a
Sorry for my silly question. I need to declare may variable as string.
1st line dim x,y,a,_
2nd line b,c,d as string
(it seems syntax error, Please be kind to correct me)
Nov 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hi,
Leave a space between ',' and '_' on the 1st line as in

Dim x,y,a, _
b,c,d as string

"Agnes" <ag***@dynamictech.com.hk> wrote in message
news:OS**************@TK2MSFTNGP11.phx.gbl...
Sorry for my silly question. I need to declare may variable as string.
1st line dim x,y,a,_
2nd line b,c,d as string
(it seems syntax error, Please be kind to correct me)

Nov 20 '05 #2

P: n/a
;O thanks a lot

"Shiva" <sh******@online.excite.com> bl
news:%2****************@tk2msftngp13.phx.gbl g...
Hi,
Leave a space between ',' and '_' on the 1st line as in

Dim x,y,a, _
b,c,d as string

"Agnes" <ag***@dynamictech.com.hk> wrote in message
news:OS**************@TK2MSFTNGP11.phx.gbl...
Sorry for my silly question. I need to declare may variable as string.
1st line dim x,y,a,_
2nd line b,c,d as string
(it seems syntax error, Please be kind to correct me)

Nov 20 '05 #3

P: n/a
Agnes,
I would suggest:
1st line dim x,y,a As String
2nd line Dim b,c,d as string
However I normally use:

Dim x As string
Dim y as string
Dim a as string
Dim b as string
Dim c as string
Dim d as string

With that many variables, I would look at what the routine was really doing
and refactor (http://www.refactoring.com) so I did not need so many string
variables. Such as using an Array instead.

Hope this helps
Jay
"Agnes" <ag***@dynamictech.com.hk> wrote in message
news:OS**************@TK2MSFTNGP11.phx.gbl... Sorry for my silly question. I need to declare may variable as string.
1st line dim x,y,a,_
2nd line b,c,d as string
(it seems syntax error, Please be kind to correct me)

Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.