identifying text commands


Closed Thread
Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Sep 2010
    Location
    Las Vegas, NV
    Posts
    305

    Default Re: identifying text commands

    I'm just curious if PBP could differentiate between caps and lower case? i.e.

    Would this:
    Code:
    IF command[0] = "G" AND command[1] = "C" THEN
      ' Do Whatever
    ENDIF
    
    IF command[0] = "G" AND command[1] = "Q" THEN
      ' Do Whatever
    ENDIF
    Produce the same results as this:
    Code:
    IF command[0] = "g" AND command[1] = "c" THEN
      ' Do Whatever 
    ENDIF
    
    IF command[0] = "g" AND command[1] = "q" THEN
      ' Do Whatever
    ENDIF
    If this is too elemental of a question I apologize for any inconvenience.

  2. #2
    Join Date
    Sep 2009
    Posts
    755

    Default Re: identifying text commands

    It's not same...
    Take look at ASSCI table
    http://www.asciitable.com/index/asciifull.gif
    "G" and "g" are just constant. You also could write 71 instead of "G", 103 instead "g".
    IF command[0] = "G" AND command[1] = "C" THEN
    is same as
    IF command[0] = 71 AND command[1] = 67 THEN

    For parsing string commands I use this:
    http://www.picbasic.co.uk/forum/show...009#post117009
    Scroll down code to CommandParser: label.
    You can easily convert upper case to lower and lower to upper as in this sample
    http://melabs.com/samples/PBP-mixed/serin.htm

Similar Threads

  1. Need a connector identifying
    By The Master in forum Off Topic
    Replies: 1
    Last Post: - 24th June 2012, 19:03
  2. How to prepare text (lots of text) for HSEROUT ?
    By Byte_Butcher in forum General
    Replies: 0
    Last Post: - 15th February 2010, 22:31
  3. Identifying which port to use
    By fadibasic in forum Schematics
    Replies: 2
    Last Post: - 24th April 2008, 02:21
  4. Help Identifying Mystery IC
    By paul borgmeier in forum Documentation
    Replies: 5
    Last Post: - 28th May 2007, 05:20
  5. Replies: 0
    Last Post: - 28th May 2004, 17:25

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts