Author Topic: Introduction and question: "Fast way of testing code snippets"  (Read 3681 times)

Offline lkg777

  • Single posting newcomer
  • *
  • Posts: 3
Introduction and question: "Fast way of testing code snippets"
« on: October 04, 2014, 09:21:06 pm »
What's up everyone! My name is Richard and i've just begun my journey as a programmer this semester (: All my classes here on out will consist of computer science (Programming). So, i'll be needing quite a bit of help here and there and can't wait to meet all the gurus here on the forums. IM PUMPED UP LETS DO THIS  ;D! Aside from all the excitement, i can wait to contribute back to the community and help in any way shape or form. It'd be my pleasure!

Question: I was wondering is there anyway to quickly test code snippets? I'm trying to run some code from my book without having to continuously make new empty files, naming them and then saving. It's quite annoying since the snippets are abundant and i constantly want to test run them to see how it works. Thanks!

-LkG777

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: Introduction and question: "Fast way of testing code snippets"
« Reply #1 on: October 05, 2014, 03:29:12 am »
In simple cases, I tend to just use a single file and Ctrl-Shift-C and Ctrl-Shift-X to comment/uncomment selected blocks of code.  Yes, it is a rather hack-ish unclean way, but if those lines of code will only be used once or twice, I see no reason why not.

Offline lkg777

  • Single posting newcomer
  • *
  • Posts: 3
Re: Introduction and question: "Fast way of testing code snippets"
« Reply #2 on: October 05, 2014, 07:22:54 pm »
Niceeeee, i'm go check out the list of shortcuts for C::B now! Thanks ;D