dbTalk Databases Forums  

Multiple Variable Declaration

comp.databases.ms-access comp.databases.ms-access


Discuss Multiple Variable Declaration in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Tony Toews
 
Posts: n/a

Default Re: Multiple Variable Declaration - 01-20-2011 , 01:31 PM






On Wed, 19 Jan 2011 18:54:06 -0600, "Clif McIrvin"
<clare.nomail (AT) gmail (DOT) com> wrote:

Quote:
I use that feature myself. Sometimes, I even remember to hit
Ctrl+<space> before I've typed AllThatLongVariableName and let
intellisense plug the name in for me (of course, I type it as
allthatlongvariablename).
I keep forgetting about that feature but then I'm a fast typist with a
worn out back space key so ...

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/

Reply With Quote
  #12  
Old   
David-W-Fenton
 
Posts: n/a

Default Re: Multiple Variable Declaration - 01-20-2011 , 04:11 PM






"Access Developer" <accdevel (AT) gmail (DOT) com> wrote in
news:8pp0ptF6ecU1 (AT) mid (DOT) individual.net:

Quote:
The default, since the beginning of Access / and classic VB has
always been "variant" and each variable name without its own "AS
clause" has defaulted to "variant".
I never did it wrong, because I never declare multiple variables on
one line (it's too hard to read), but I could swear I'd seen sample
code that used it. But in going through all the code I have, I don't
see any of it doing it wrong.

I guess I must misperceived what was being suggested -- I'm glad I
didn't like it, or I would have written a lot of bad code over the
years (though surely I would have realized there were problems the
first time I assumed an unitialized variable was a 0 and it turned
out to be empty).

--
David W. Fenton http://www.dfenton.com/
contact via website only http://www.dfenton.com/DFA/

Reply With Quote
  #13  
Old   
Access Developer
 
Posts: n/a

Default Re: Multiple Variable Declaration - 01-20-2011 , 07:21 PM



As someone pointed out, it works in compilers for some other languages --
perhaps that's where you saw it.

I'm thinking that maybe it even worked in Borland Turbo Basic, but it's been
a long time since I used that one.

Larry

"David-W-Fenton" <dfassoc (AT) dfenton (DOT) com> wrote

Quote:
"Access Developer" <accdevel (AT) gmail (DOT) com> wrote in
news:8pp0ptF6ecU1 (AT) mid (DOT) individual.net:

The default, since the beginning of Access / and classic VB has
always been "variant" and each variable name without its own "AS
clause" has defaulted to "variant".

I never did it wrong, because I never declare multiple variables on
one line (it's too hard to read), but I could swear I'd seen sample
code that used it. But in going through all the code I have, I don't
see any of it doing it wrong.

I guess I must misperceived what was being suggested -- I'm glad I
didn't like it, or I would have written a lot of bad code over the
years (though surely I would have realized there were problems the
first time I assumed an unitialized variable was a 0 and it turned
out to be empty).

--
David W. Fenton http://www.dfenton.com/
contact via website only http://www.dfenton.com/DFA/

Reply With Quote
  #14  
Old   
mbyerley
 
Posts: n/a

Default Re: Multiple Variable Declaration - 01-20-2011 , 09:12 PM



"Access Developer" <accdevel (AT) gmail (DOT) com> wrote

Quote:
As someone pointed out, it works in compilers for some other languages --
perhaps that's where you saw it.

I'm thinking that maybe it even worked in Borland Turbo Basic, but it's
been a long time since I used that one.
Delphi too...

Quote:
Larry

"David-W-Fenton" <dfassoc (AT) dfenton (DOT) com> wrote in message
news:Xns9E73AEEE471BBf99a49ed1d0c49c5bbb2 (AT) 74 (DOT) 209.136.97...
"Access Developer" <accdevel (AT) gmail (DOT) com> wrote in
news:8pp0ptF6ecU1 (AT) mid (DOT) individual.net:

The default, since the beginning of Access / and classic VB has
always been "variant" and each variable name without its own "AS
clause" has defaulted to "variant".

I never did it wrong, because I never declare multiple variables on
one line (it's too hard to read), but I could swear I'd seen sample
code that used it. But in going through all the code I have, I don't
see any of it doing it wrong.

I guess I must misperceived what was being suggested -- I'm glad I
didn't like it, or I would have written a lot of bad code over the
years (though surely I would have realized there were problems the
first time I assumed an unitialized variable was a 0 and it turned
out to be empty).

--
David W. Fenton http://www.dfenton.com/
contact via website only http://www.dfenton.com/DFA/


Reply With Quote
  #15  
Old   
David-W-Fenton
 
Posts: n/a

Default Re: Multiple Variable Declaration - 01-21-2011 , 07:12 PM



"Access Developer" <accdevel (AT) gmail (DOT) com> wrote in
news:8ps5cuFtrcU1 (AT) mid (DOT) individual.net:

Quote:
As someone pointed out, it works in compilers for some other
languages -- perhaps that's where you saw it.
Not possible. I haven't used any other strongly-typed programming
languages at all (I've only used Paradox's PAL, which had no
variable typing, at least at the time I used it, PHP, which doesn't
type variables, and VBScript, which doesn't type variables).

Quote:
I'm thinking that maybe it even worked in Borland Turbo Basic, but
it's been a long time since I used that one.
I don't know where I got it from. It's probably more likely that I
misinterpreted what someone wrote than it is that someone suggested
doing it wrong.

--
David W. Fenton http://www.dfenton.com/
contact via website only http://www.dfenton.com/DFA/

Reply With Quote
Reply




Thread Tools
Display Modes

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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.