Results 1 to 9 of 9

Thread: xxx$()

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Posts
    15

    Unhappy

    explaination needed!

    i had seen some of the functions have '$' mark before the parentheses and some don with the same functions such as chr$() or chr() and ucase$() or ucase().

    izit the returned value will converted to string ?

    went will we use either of it ?

    thank !
    MS VB Enterprise, C

  2. #2
    Guru Yonatan's Avatar
    Join Date
    Apr 1999
    Location
    Israel
    Posts
    892
    They work the same. The one without the dollar sign is waaaaay cuter.

  3. #3
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    Someone here told it's a bit faster 'cause VB doesn't have to find out what type to pass, so if you pass the $ with it ($ means (As) String), VB knows it's a string and doesn't have to convert it.

    Doing
    Dim Str$
    is the same as
    Dim Str As String

    % = integer
    & = long

    there are more but I keep forgetting these.
    @ = currency?
    # = single or double?

    Kedaman knows them all.
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  4. #4
    Fanatic Member
    Join Date
    Oct 2000
    Location
    London
    Posts
    1,008
    $: String
    %: Integer
    &: Long
    !: Single
    #: Double
    @: Currency

    Cheers,

    Paul.
    Not nearly so tired now...

    Haven't been around much so be gentle...

  5. #5

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Posts
    15
    em ...

    Jop, izint the chr() should convert from ascii code to character format . the chr$() is telling vb that ascii code is string , is that what u mean ?

    MS VB Enterprise, C

  6. #6
    Fanatic Member
    Join Date
    Oct 2000
    Location
    London
    Posts
    1,008
    These can be used creatively.

    i.e.

    ...go to the pub. OK, I can't be & because i'm no longer ! and the wife keeps me on a very short $. If you are buying, mine's a #, I haven't got any @.

    If anyone can fit % in, they are better than me

    Cheers,

    P.
    Not nearly so tired now...

    Haven't been around much so be gentle...

  7. #7
    Hyperactive Member tumblingdown's Avatar
    Join Date
    Mar 2000
    Posts
    362
    Our local zoo has a tiger, affectionatley known as 'teger'.
    I took my baby sister to the zoo to see it. While my back was turned, the tiger ate my sister! Everybody saw it but me. I shouted "Where's my sister?"

    Everybody pointed and said...

    "Over there, %"




    (poor, i know;-)

    td.

    "One logical slip and an entire scientific edifice comes tumbling down." - Robert M. Pirsig


    [email protected]

    "but if Einstein is right and God is in the details, reality requires that we sometimes get religion." - Scott Meyers.

  8. #8
    Guru Yonatan's Avatar
    Join Date
    Apr 1999
    Location
    Israel
    Posts
    892
    Originally posted by chan
    em ...

    Jop, izint the chr() should convert from ascii code to character format . the chr$() is telling vb that ascii code is string , is that what u mean ?

    No: As I said, Chr() and Chr$() are exactly the same, except Chr() looks better when someone sees your code.
    ("Ewwww, what's this ugly dollar sign doing here?")

  9. #9
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    how can you say that Yonayan! I love the dollar sign, well some ppl don't like money i know but well i'm not talking about that now, !#$@& looks much nicer than as **** or C**()
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

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