Host Engineering Forum

General Category => General Discussion => Topic started by: PLCGuy on August 30, 2016, 09:27:02 AM

Title: empty string
Post by: PLCGuy 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?
Title: Re: empty string
Post by: plcnut on August 30, 2016, 10:21:56 AM
SL0.length=0
Title: Re: empty string
Post by: PLCGuy on August 30, 2016, 12:05:35 PM
dam it, stop making things so simple, goes right over my head.
Title: Re: empty string
Post by: Greg 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.
Title: Re: empty string
Post by: PLCGuy on August 31, 2016, 08:35:28 PM
greq i will try that one.