Author Topic: Code-tags For Your Sample Code  (Read 18724 times)

0 Members and 1 Guest are viewing this topic.

Visio Guy

  • Administrator
  • Hero Member
  • *****
  • Posts: 1716
  • Smart Graphics for Visual People...n' Stuff
    • Visio Guy
Code-tags For Your Sample Code
« on: May 26, 2008, 07:51:55 AM »
Hi Folks,

If you want to post code samples, it will format more nicely--and be easier to copy for other readers--if you wrap it in BBCode Code Tags

There doesn't seem to be a nice button on the formatting toolbar, but it is pretty easy: All you have to do is wrap these bracketed bits around your code:

[code]

  Debug.Print "Hello World"

[/code]


It'll look like this when you're done:

Code

  Debug.Print "Hello World"


Edit: or hit the "#" button on the toolbar! Thanks Lars-Erik!
« Last Edit: May 26, 2008, 04:04:32 PM by Visio Guy »
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

Lars-Erik

  • Sr. Member
  • ****
  • Posts: 278
Re: Code-tags For Your Sample Code
« Reply #1 on: May 26, 2008, 07:57:52 AM »
There is... just hit the # button.
Bottom row, 3d from the left

- Lars

Visio Guy

  • Administrator
  • Hero Member
  • *****
  • Posts: 1716
  • Smart Graphics for Visual People...n' Stuff
    • Visio Guy
Re: Code-tags For Your Sample Code
« Reply #2 on: May 26, 2008, 04:05:08 PM »
 :-\I gotta quit doing the forum so late at night...
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

KeithRuck

  • Jr. Member
  • **
  • Posts: 18
Re: Code-tags For Your Sample Code
« Reply #3 on: November 25, 2009, 05:43:17 PM »
I just posted a forum question, and without realizing it, put one snippet in the code brackets, and the other in quote brackets.

Interestingly, the snippet in the quote bracket is much easier to read (the font is larger). I wonder if there is any way to set the code snippets to render at the same font size as the rest of the post? My eyes are too old to read 6pt font...

:)

Visio Guy

  • Administrator
  • Hero Member
  • *****
  • Posts: 1716
  • Smart Graphics for Visual People...n' Stuff
    • Visio Guy
Re: Code-tags For Your Sample Code
« Reply #4 on: November 26, 2009, 06:18:44 AM »
I think I switched the code font-size before, but then there was a major upgrade to the forum software which might have whacked that change.

By the way, Ctrl + "+" and Ctrl + "-" zoom most browsers in and out these days, which is another nice trick. Ctrl + 0 gets you back to normal zoom.

Thanks for the reminder...

There, I think I've got it set to a bigger font:

Code
10 PRINT "Big code font"
20 GOTO 10
« Last Edit: November 26, 2009, 06:38:56 AM by Visio Guy »
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

jastronomy

  • Jr. Member
  • **
  • Posts: 14
Re: Code-tags For Your Sample Code
« Reply #5 on: October 28, 2010, 05:33:50 PM »
loving the spaghetti code... I used to have a scientific graphical calculator many years back... I wrote a game in spaghetti code, that drew smileys for the correct answer to a table of 32 questions... pretty lame, but it made me smile when it finally worked (5 weeks after starting it)