Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / General 2 / January 2006



Tip: Looking for answers? Try searching our database.

Dim statement

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chuck - 22 Jan 2006 12:45 GMT
Trying to teach myself visual basic.  Haven't written any code since the days
of DOS using Turbo Pascal.  I have a number of Pascal programs that run OK in
Win 98, except that the graphicll outputs portions (X-Y plots) do not print
with my ink jet printer.  The text portions do print OK.

One program has about 200 variables of type integer.  Do I have to write Dim A
as Integer, Dim B as Integer, ... or can I write Dim A, B, ... as Integer?

Chuck
Dikkie Dik - 22 Jan 2006 13:31 GMT
You can write
Dim A as Integer, B as Integer, ...

Otherwise, it would declare all variables as Variant, except for the
last one.

You can use functions and subs in VB. And even classes. If there are
more than 5 variables declared in just one sub or function, I'd split it up.

> Trying to teach myself visual basic.  Haven't written any code since the days
> of DOS using Turbo Pascal.  I have a number of Pascal programs that run OK in
[quoted text clipped - 5 lines]
>
> Chuck
Jay Taplin - 23 Jan 2006 13:51 GMT
How about using an array?

Dim intValues(199) as Integer

Jay Taplin MCP VB

> Trying to teach myself visual basic.  Haven't written any code since the
> days
[quoted text clipped - 9 lines]
>
> Chuck
Henning - 24 Jan 2006 02:04 GMT
You can also use Dim aa%, ab%, ac%,.......az%

> Trying to teach myself visual basic.  Haven't written any code since the days
> of DOS using Turbo Pascal.  I have a number of Pascal programs that run OK in
[quoted text clipped - 6 lines]
> Chuck
> --
Chuck - 31 Jan 2006 00:15 GMT
>Trying to teach myself visual basic.  Haven't written any code since the days
>of DOS using Turbo Pascal.  I have a number of Pascal programs that run OK in
[quoted text clipped - 5 lines]
>
>Chuck

Thanks for the suggestions.

I took the easy way out.  I resurrected an old Dot Matrix printer and ran the
programs in a DOS boot system.  As it turns out, The programs will run in
windows ME with the Dot Matrix printer connected, except that the the last line
of the printout which is a form feed only does a line feed.  Not a real problem
even if I didn't have a DOS boot system.

I can't quite convince myself to learn another programing language.  Heck, I
can't covince myself to write more code in a language I used to know.

Thanks again.

Chuck
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.