Thread: Verifying absence of brackets and parentheses

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Tears of the stars thames's Avatar
    Join Date
    Oct 2012
    Location
    Rio, Brazil
    Posts
    193
    Quote Originally Posted by Nominal Animal View Post
    You can simplify your logic by using the fact that you have delimiter pairs surrounding your content.

    You essentially have just two states: within content, and between content. The identity of the delimiters is just a data point you keep in helper variable(s). (This is the laziness bit I mentioned in another thread, when designing state machines.)
    Does that mean the lazier my state machine is, the better (when it comes to complexity) it will be?
    in the another thread, could I have used a lazier approach? i.e. used the "within content/between content" approach?

    Quote Originally Posted by Nominal Animal View Post
    I'm just personally so lazy I've found it easier to use the "you have the character already in c" idiom.
    please explain further what this idiom is.
    Last edited by thames; 11-01-2012 at 03:51 PM. Reason: new quote

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. dsa signing and verifying
    By kakashi316 in forum C Programming
    Replies: 4
    Last Post: 05-06-2012, 02:21 PM
  2. Need help with a Sudoku verifying program
    By Skeeter in forum C Programming
    Replies: 3
    Last Post: 10-30-2009, 08:15 PM
  3. verifying image compression
    By elninio in forum C++ Programming
    Replies: 2
    Last Post: 06-17-2008, 07:36 PM
  4. Verifying int with while(!(cin >> num))
    By motarded in forum C++ Programming
    Replies: 3
    Last Post: 02-26-2006, 10:37 PM
  5. Verifying single digit input
    By Syked4 in forum C Programming
    Replies: 8
    Last Post: 05-31-2005, 07:11 PM

Tags for this Thread