Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: Error Trap Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
RWCS
Senior Member
Senior Member
Avatar

Joined: October 28 2002
Location: United States
Online Status: Offline
Posts: 102
Posted: January 23 2009 at 08:51 | IP Logged Quote RWCS

I'm attempting to detect COM errors. I know what the "correct" response should be, and I'm interested in flagging the non-correct responses. (one correct response many non-correct responses) I tried this:

if ({COM_RX} = "@SRC:1" ,, ph_msgbox ("COM ERROR", "COM ERROR", 0))

I can't determine if the problem is with the null true condition or the Boolean test condition. (couldn't find help on Boolean syntax in help)

Bob
Back to Top View RWCS's Profile Search for other posts by RWCS Visit RWCS's Homepage
 
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: January 23 2009 at 09:57 | IP Logged Quote BeachBum

What about this:

if (ph_getglobal_s("COM_RX") = "@SRC:1" ,999, ph_msgbox ("COM ERROR", "COM ERROR", 0))


__________________
Pete - X10 Oldie
Back to Top View BeachBum's Profile Search for other posts by BeachBum
 
RWCS
Senior Member
Senior Member
Avatar

Joined: October 28 2002
Location: United States
Online Status: Offline
Posts: 102
Posted: January 23 2009 at 10:43 | IP Logged Quote RWCS

Thanks for your suggestion. It works with ("{COM_RX}") instead of ("COM_RX")

Bob
Back to Top View RWCS's Profile Search for other posts by RWCS Visit RWCS's Homepage
 
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: January 23 2009 at 10:50 | IP Logged Quote BeachBum

Half the time it works with brackets and the other not for me. So if brackets don’t work I use getglobal_s.

__________________
Pete - X10 Oldie
Back to Top View BeachBum's Profile Search for other posts by BeachBum
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum