Re: question(s) about declaring variables

Tech-Archive recommends: Fix windows errors by optimizing your registry




"Michael C" <mculley@xxxxxxxxxxxxxxxxxxxxxx> wrote

> "Larry Serflaten" <serflaten@xxxxxxxxxxxxxx> wrote

> > Because of that, those character type identifiers are needed for more
> > control, not backward compatability.
>
> No they're not, you can just use something like this:
>
> Dim i As Long
> i = 650
> Debug.Print i * CLng(1000)


Now try it like this:

Debug.Print &HDAFF&
Debug.Print CLng(&HDAFF)

If using CLng was an exact replacement, those two would print the
same value, but they don't....

The point is you get a Long at compile time using the type definition
character, where using the function still involves VB assigning the
value to whatever type it deems correct, at compile time. To force
VB to use the type you want, those characters are still needed.

LFS


.



Relevant Pages

  • Re: Text processing examples with Fortran requested
    ... of expressions allowed for the CHARACTER data type is carefully ... designed to avoid the requirement of temporaries of unknown (at ... known at compile time. ...
    (comp.os.vms)
  • Re: Trouble writing Ada callback from C
    ... I take it you mean "not known at compile time" because it is indeed ... arrays of characters, which do not carry bounds information. ... followed by a null character ". ... the C overlords are giving me a string of length 0--the ...
    (comp.lang.ada)
  • Re: Internal read from parameter
    ... from a character variable, not a parameter. ... mustn't be allowed to write to a parameter, but why does the standard ... disallow reading from one? ... usage at compile time. ...
    (comp.lang.fortran)
  • REVIEW/ACRA: Superfreaks # 9-13
    ... So, I finally got around to reading last month's batch of SUPERFREAKS, ... hard on Martin for the transparency of some of his character analogues. ... Now, during this, we get a personal B-plot with goofy Edward courting ... And that's control. ...
    (rec.arts.comics.creative)
  • Re: wide screen text mode?
    ... Is there a reason it *must* be DOS text mode? ... attribute color control. ... With a script or a long novel, each character can be assigned a custom ... pasted 4 such screens together to get a screen that is 1212x800. ...
    (comp.os.msdos.programmer)