Results 1 to 3 of 3

Thread: signed fields

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2006
    Posts
    260

    signed fields

    i have this chart :
    Code:
    A                 1
    B                 2
    C                 3
    D                 4 
    E                 5
    F                 6
    G                 7
    H                 8
    I                  9
    J                  0
    and
    Code:
    K                 -1
    L                 -2
    M                -3
    N                -4
    O                -5
    P                -6
    Q               -7
    R                -8
    S                -9
    T                -0
    so for example if i have a number like this.
    12.89 then i need to convert it to :

    +12.89 = 128I
    -12.89 = 128S

    -0.19 = 01S
    +0.19 = 01I

    that is what i have to do. now i could just write crazy if and else if statment for each number from 1 to 0 with plus and minus sign to do this, but is there easier way and faster too? ty. as of this moment i couldnt think of any. plz help me guys
    Last edited by dummies2; Nov 22nd, 2006 at 12:07 PM.

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2006
    Posts
    260

    Re: signed fields

    got it ty. but now how do i do this?

    12345
    123

    and i want to only display
    1234
    12
    which function do this? right left? trim?

  3. #3
    Hyperactive Member kayos's Avatar
    Join Date
    Apr 2004
    Location
    Largo, Florida
    Posts
    306

    Re: signed fields

    VB Code:
    1. Function TrimLastChar(Str)
    2.      op = Left(Str, Len(Str) - 1)
    3.     TrimLastChar = op
    4. End Function


    If this post helps, please RATE MY POST!

    Using Visual Studio 2005 SE

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width