News:

  • June 11, 2026, 11:16:21 PM

Login with username, password and session length

Author Topic: empty string  (Read 8696 times)

PLCGuy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 677
empty string
« on: August 30, 2016, 09:27:02 AM »
how do I check to see if a string is empty. I have SL0 and what to detect if it is empty. I was able to detect numbers like 0,1,2,3,4,5 but what is the symbol for empty?

plcnut

  • Hero Member
  • *****
  • Posts: 814
    • premiersi.com
Re: empty string
« Reply #1 on: August 30, 2016, 10:21:56 AM »
SL0.length=0
Circumstances don't determine who we are, they only reveal it.

~Jason Wolthuis
Premier Systems Integration, LLC
http://premiersi.com

PLCGuy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 677
Re: empty string
« Reply #2 on: August 30, 2016, 12:05:35 PM »
dam it, stop making things so simple, goes right over my head.

Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 702
  • Hmmm...
    • Host Engineering, Inc.
Re: empty string
« Reply #3 on: August 30, 2016, 02:47:20 PM »
You can also use the ISCLEAR instruction which will set a bit if the string is clear.
There are two types of people in the world; those that can extrapolate from incomplete data sets.

PLCGuy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 677
Re: empty string
« Reply #4 on: August 31, 2016, 08:35:28 PM »
greq i will try that one.