Re: Unsigned Integer

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Duane Bozarth (dp_bozarth_at_swko.dot.net)
Date: 02/27/04

  • Next message: MikeD: "Re: You can almost hear the crickets chirping...."
    Date: Thu, 26 Feb 2004 19:39:17 -0600
    
    

    Farsad Nasseri wrote:
    >
    > What do you declare ix% an iy% as? integers? longs?
    >
    > and isn't ">" the equivilant of >> in C?
    >
    > Thanks again for the help

    Oh, you really <don't> know VB, do you? :)

    The trailing "%" on the variable name declares it as Integer (from BASIC
    rules before the As Type syntax was introduced by MS). The trailing "&"
    is the identifier for a Long. (These are all in the help files for data
    types). I just used the shorthand nomenclature as you can type Dim in
    the Immediate window and I wanted a specific length for the
    demonstration.

    ">" and "<" are relational operators in VB as in C...

    BTW, this question (or related ones about bit operations) comes up
    frequently. It seems to me that within the last year we went through
    and developed a set of routines for another poster in
    comp.lang.visual.basic.misc, the other VB ng I monitor. You might try
    Googling there. I'd also wager there's a reasonable chance of finding a
    set of routines on some of the VB code sites.

    Unfortunately, I can't provide a packaged set of routines myself as I
    did take the easy way out of using Fortran intrinsics (Fortran's my
    primary language, I use VB mostly for GUIs in front of the computation
    engine) so I simply link these in when/if I need them. But, as I say,
    it isn't that difficult to roll you own little functions.


  • Next message: MikeD: "Re: You can almost hear the crickets chirping...."

    Relevant Pages

    • Re: Public Variables
      ... If you wanted to really follow the OOP paradigm, ... > Are you stating that I should ALWAYS declare ALL variables as private? ... > My object is not to learn programming style as I only wrote this one ... >>> The program consists of 2 forms, and about 12 routines I wrote. ...
      (microsoft.public.dotnet.languages.vb)
    • Re: VARCHAR columns in COBOL
      ... The following pertails to DB2 LUW, but I imagine Oracle is similar (or ... will trailing spaces be removed upon INSERT ... EXEC SQL BEGIN DECLARE SECTION END-EXEC. ...
      (comp.lang.cobol)
    • Re: Public Variables
      ... Are you stating that I should ALWAYS declare ALL variables as private? ... when every other proceedure needs to know the new value. ... >> The program consists of 2 forms, and about 12 routines I wrote. ...
      (microsoft.public.dotnet.languages.vb)
    • Re: reusing routines
      ... > delare it in my uses clause I should be able to address those routines ... one at the start of the interface section and one at the implementation ... If both Main and Library declare a type TIndex, ... stricter, visibility rules. ...
      (alt.comp.lang.borland-delphi)
    • Re: Will undefined varialbes test as False?
      ... This is a situation were I can't declare the variable or not easily. ... These are debug routines that test a global switch ... call them from the immediate window, unless it is after a break, those ... If the routine is called from the program, the switch will have ...
      (microsoft.public.vb.general.discussion)