Javascript --use of reserved word "short"
Results 1 to 7 of 7

Thread: Javascript --use of reserved word "short"

  1. #1
    Registered User
    Join Date
    Oct 2001
    Location
    dallas
    Posts
    14

    Question Javascript --use of reserved word "short"

    As noted by the topic, I'm not advanced at all when it comes to "programming". I've toyed with perl / php etc a while back and just stopped.

    For the past week I've been messing with the use of reserved words in Javascript. The one I can't seem to find any documentation on is the word "short". I'm under the impression that it's used in various other programming languages and performs some sort of mathmatical function with an integer... Perhaps someone could explain to me what this actually is or how it's used. An example and effect would work (OR even just a link to read, for I can't seem to track anything down)

    Thanks in advance for the help.

  2. #2
    Registered User Deity's Avatar
    Join Date
    Mar 2001
    Location
    Elsewhere
    Posts
    1,412

    Post

    A short is an 8-bit signed integer data type.

    <a href="http://aether.lbl.gov/www/manuals/html/dict/netscape/javascr/reserve.HTM" target="_blank">http://aether.lbl.gov/www/manuals/html/dict/netscape/javascr/reserve.HTM</a>
    A bored admin is a very dangerous person...

  3. #3
    Registered User
    Join Date
    Oct 2001
    Location
    dallas
    Posts
    14

    Post

    Ok, kind of makes sense but better than nothing! I appreciate it. I'm off to look for some information on 8 bit signed integers now! I take it I'd be able to find this information in C++ tutorials?

  4. #4
    Registered User
    Join Date
    Oct 2001
    Location
    dallas
    Posts
    14

    Post

    haha, just looking at some information regarding data types. Whoa, I'm in over my head.. but slowing digging my way up!

  5. #5
    Registered User Deity's Avatar
    Join Date
    Mar 2001
    Location
    Elsewhere
    Posts
    1,412

    Post

    I've honestly never seen anybody use a short integer in a program. With the amount of memory in systems today saving 8 bits is not high on my priority list.
    A bored admin is a very dangerous person...

  6. #6
    Registered User
    Join Date
    Nov 1999
    Location
    USA
    Posts
    696

    Post

    Actually, I'm pretty sure 'short' is a 16-bit signed integer. 'Byte' is the 8-bit one.

    Not that it really matters, though, because as Deity said, memory is so cheap since 1980something that hardly any programmer ever has to worry about saving 8 bits of space if they're programming for a PC. I'm sure it might matter if you're programming a toaster oven, though.

    Still, wouldn't hurt you to just read a blurb or a little tutorial on data types. Might not need to know much if you're only dealing with stuff you write, but if you ever have to play with anyone else's code, you'll probably need more knowledge. Got a lunch date now, but I'll look for a good site for you later...

    **EDIT**

    Try <a href="http://java.sun.com/docs/books/tutorial/java/nutsandbolts/datatypes.html" target="_blank">this part</a> of the Java tutorial at Sun's site.

  7. #7
    Registered User
    Join Date
    Oct 2001
    Location
    dallas
    Posts
    14

    Post

    Excellent, I'm on the road to understanding more and more. Many thanks for all your help

Bookmarks

Posting Permissions

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