Jump to content

Presenting code samples safely?


PhotoWebMax
 Share

Recommended Posts

How would you present blocks of code to PW pages that would not be executed? (i.e.: just show the code)...

Something like the code clipboard feature that everyone uses to showcase code on this forum system? Is there a simple method or a PW Module to handle this chore?

Thanks!

Link to comment
Share on other sites

I just set up a textarea field, add the Textile formatter to it, and then use the appropriate code such as bc.. which is short for block code.

bc.. INPUT "What is your name: ", UserName$
PRINT "Hello "; UserName$

DO
  INPUT "How many stars do you want: ", NumStars
  Stars$ = STRING$(NumStars, "*")
  PRINT Stars$

For more info have a look here.

Hope that helps?

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...