+ 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
    16,374
    Thank Post
    906
    Thanked 1,811 Times in 1,559 Posts
    Blog Entries
    12
    Rep Power
    468

    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
    18,523
    Thank Post
    527
    Thanked 2,645 Times in 2,047 Posts
    Blog Entries
    24
    Rep Power
    924
    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
    11,271
    Thank Post
    884
    Thanked 2,749 Times in 2,322 Posts
    Blog Entries
    11
    Rep Power
    785
    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,159
    Thank Post
    116
    Thanked 529 Times in 452 Posts
    Blog Entries
    2
    Rep Power
    125
    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
    11,271
    Thank Post
    884
    Thanked 2,749 Times in 2,322 Posts
    Blog Entries
    11
    Rep Power
    785
    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
    18,523
    Thank Post
    527
    Thanked 2,645 Times in 2,047 Posts
    Blog Entries
    24
    Rep Power
    924
    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, 06:43 PM
  2. How Long?
    By Gatt in forum General Chat
    Replies: 13
    Last Post: 14th April 2008, 11:49 AM
  3. Replies: 5
    Last Post: 22nd June 2007, 10:04 PM
  4. How long will it take...
    By philpayton in forum Windows
    Replies: 5
    Last Post: 8th March 2007, 05:21 PM
  5. Top 11 Geek Pickup Lines (Part 1)
    By Geoff in forum Jokes/Interweb Things
    Replies: 5
    Last Post: 5th December 2005, 01: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
  •