+ Post New Thread
Results 1 to 6 of 6
EduGeek.net Site Problems Thread, Wiki and long lines in EduGeek Stuff; Room Activation - EduGeek.net Wiki Is there anyway to fix this problem apart from manually putting a line in? Thanks...
  1. #1

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,755
    Thank Post
    825
    Thanked 1,661 Times in 1,446 Posts
    Blog Entries
    11
    Rep Power
    441

    Wiki and long lines

    Room Activation - EduGeek.net Wiki

    Is there anyway to fix this problem apart from manually putting a line in?

    Thanks

  2. #2

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Minehead
    Posts
    17,497
    Thank Post
    513
    Thanked 2,391 Times in 1,853 Posts
    Blog Entries
    24
    Rep Power
    819
    I think this is more a case of coding etiquette. I was taught that you should always try to limit each line to 80 characters, entering long lines across multiple lines.

  3. #3

    SYNACK's Avatar
    Join Date
    Oct 2007
    Posts
    10,980
    Thank Post
    850
    Thanked 2,647 Times in 2,249 Posts
    Blog Entries
    9
    Rep Power
    763
    Quote Originally Posted by localzuk View Post
    I think this is more a case of coding etiquette. I was taught that you should always try to limit each line to 80 characters, entering long lines across multiple lines.
    I agree with localzuk in this instance, you can use continuation characters to break up the lines to make it more easily readable in print or screen format and yet continue code execution as if it was a single line. I think the VBS one is:
    Code:
    _
    
    Example:
    MsgBox "This is the firs tline" & _
    "this is the second"

  4. #4

    Join Date
    Aug 2005
    Location
    London
    Posts
    3,154
    Thank Post
    114
    Thanked 527 Times in 450 Posts
    Blog Entries
    2
    Rep Power
    123
    I'd guess 80 characters is a throwback to punched cards or text mode screens which were 80 characters wide but short lines are easier to read (think newspaper columns).

    I often do things like:

    sMsg="this is the first bit of the message"
    sMsg=sMsg & " and this is the next bit"
    msgbox sMsg

    which I find easier to read. It's also good when you're building SQL queries - I like to have the select, from, join, order etc bits on separate lines.

  5. #5

    SYNACK's Avatar
    Join Date
    Oct 2007
    Posts
    10,980
    Thank Post
    850
    Thanked 2,647 Times in 2,249 Posts
    Blog Entries
    9
    Rep Power
    763
    If you are appending lots of different strings together with "string" & "string" it becomes quite slow (comparatively) due to the way that VBS handles string concatenation. The best and fastest way is to use a stringbuilder class to join all of these strings together.

    For these types of scripts the performance hit is not really important but the more text that you add the more of a problem it can become for the run time.

    Here is a better write up on it and an example:
    15 Seconds : Code Samples : Super Fast String Concatenation

  6. #6

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Minehead
    Posts
    17,497
    Thank Post
    513
    Thanked 2,391 Times in 1,853 Posts
    Blog Entries
    24
    Rep Power
    819
    Quote Originally Posted by srochford View Post
    I'd guess 80 characters is a throwback to punched cards or text mode screens which were 80 characters wide but short lines are easier to read (think newspaper columns).
    It's all down to unix days really. A standard console is 80 characters wide.
    But it is still applicable now really, as reading a 300+ character line is difficult.

SHARE:
+ Post New Thread

Similar Threads

  1. [Joke] One of the best put down lines ever?
    By Ryan in forum Jokes/Interweb Things
    Replies: 14
    Last Post: 20th October 2009, 05:43 PM
  2. How Long?
    By Gatt in forum General Chat
    Replies: 13
    Last Post: 14th April 2008, 10:49 AM
  3. Replies: 5
    Last Post: 22nd June 2007, 09:04 PM
  4. How long will it take...
    By philpayton in forum Windows
    Replies: 5
    Last Post: 8th March 2007, 04:21 PM
  5. Top 11 Geek Pickup Lines (Part 1)
    By Geoff in forum Jokes/Interweb Things
    Replies: 5
    Last Post: 5th December 2005, 12:28 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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