Re: Dim + the sign &



On 14 Feb, 10:09, "Jan Hyde (VB MVP)"
<StellaDrin...@xxxxxxxxxxxxxxxxxxx> wrote:
"Mike Williams" <mi...@xxxxxxxxxxxxxxxxx>'s wild thoughts
were released on Wed, 13 Feb 2008 22:06:16 -0000 bearing the
following fruit:





"Larry Serflaten" <serfla...@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.

Well, I can put it any better than that. I agree completely.

--
Jan Hyde

https://mvp.support.microsoft.com/profile/Jan.Hyde- Dölj citerad text -

- Visa citerad text -

hmm, in declaring a iValue as a integer and a sValue as a string I
think value% and value$ is nicer (not shure about the % it was almost
20 years ago) but the +value is that I can miss renaming my string (s)
to an int (i) if doing so in the dim iValue as String

and back then only 1 char in variables so

10 FOR I%=1 TO 10 STEP 1
20 PRINT "WHAT IS YOUR NAME NR:";I%;" ?"
30 INPUT S$
40 PRINT "HELLO ";S$
50 NEXT I%
60 END


Ahhh.... thaat wore the days,,,
//CY
.



Relevant Pages

  • Re: Prothon should not borrow Python strings!
    ... """It does not make sense to have a string without knowing what encoding ... same cul de sac as Python. ... Prothon_String_As_ASCII // raises error if there are high characters ... Python's split between byte strings and Unicode strings is ...
    (comp.lang.python)
  • Re: Letter to US Sen. Byron Dorgan re unpaid overtime
    ... put them in stupid places. ... Programming is difficult (as you must surely appreciate, ... > strings will be in the range 1...1000 characters. ... impose an artificially small limit on string length." ...
    (comp.programming)
  • Re: Byte Array to String
    ... retrieved text will mismatch the original characters. ... encoding the characters. ... Dim strFileData as String ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: A note on personal corruption as a result of using C
    ... impossible to write effective string validation routines by definition ... (Note that a string literal may contain embedded null characters; ... without resorting to abusive language. ... In practice, programmers typically use "struct" ...
    (comp.programming)
  • Re: Self-Documenting Code Contest
    ... self-documenting. ... query:= 'documenting' asSortedCollection. ... string size < query size ... two words becomes a set of Characters. ...
    (comp.lang.smalltalk)