Re: Dim + the sign &



"Larry Serflaten" <serflaten@xxxxxxxxxxxxxx> wrote in message news:eU9G$hobIHA.5712@xxxxxxxxxxxxxxxxxxxxxxx

I never did understand why that was considered bad practise.
To say using a symbolic shortcut for more verbose wording is
bad just doesn't make too much sense to me. It would be like
saying using $3.95 is bad and it should always be written as
3 Dollars and 95 Cents. Who is at fault if a code reviewer
does not comprehend the purpose of a For/Next, or If/Then
block of code? Similarly so for the type declaration

I would tend to agree with you were it not for the fact the type declaration characters are not as widely understood as the $ sign for currency (even by programmers), as is evidenced by the number of questions which appear on this and other groups from time to time. In fact, much as I hate to admit it after having used Basic (and Visual Basic) for as long as I have, I do not immediately recognise them myself. I know they are type declaration characters, but I often get confused as to which character goes with which type. Personally I much prefer to see Dim z as Long, etc.

Mike


.



Relevant Pages

  • Re: File List Box
    ... These are called 'type declaration characters' and are a holdover from prior ... So, Dim s as String, and Dim s$ are the same. ...
    (comp.lang.basic.visual.misc)
  • Re: Dim + the sign &
    ... saying using $3.95 is bad and it should always be written as ... Who is at fault if a code reviewer ... I would tend to agree with you were it not for the fact the type declaration ... characters are not as widely understood as the $ sign for currency (even by ...
    (microsoft.public.vb.general.discussion)