News:

  • September 29, 2026, 03:42:15 PM

Login with username, password and session length

Author Topic: Empty String Compare Statement  (Read 10108 times)

Bolt

  • Hero Member
  • *****
  • Posts: 598
Empty String Compare Statement
« on: August 19, 2019, 07:47:19 PM »
Is there an easy way to tell if a string is empty?  I don't think STRCMP can do it, without setting a dummy string to be empty.  And I also can't create a Symbolic Constant with a string content.  What am I missing?

Andrew S

  • Hero Member
  • *****
  • Posts: 144
Re: Empty String Compare Statement
« Reply #1 on: August 19, 2019, 10:00:44 PM »
without setting a dummy string to be empty.
That's what I do. Works just fine.

Andrew.

ATU

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 2126
  • YKPAIHA
    • ATU, Inc.
Re: Empty String Compare Statement
« Reply #2 on: August 19, 2019, 11:04:24 PM »
You could also use the ISCLEAR function

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3847
    • Host Engineering
Re: Empty String Compare Statement
« Reply #3 on: August 20, 2019, 06:34:25 AM »
The string has a .Length member, so in an equal-to contact, do
MyString.Length = 0

Bolt

  • Hero Member
  • *****
  • Posts: 598
Re: Empty String Compare Statement
« Reply #4 on: August 20, 2019, 07:20:12 PM »
The string has a .Length member, so in an equal-to contact, do
MyString.Length = 0

Doh!  I already did that in other parts of my program, not sure why that didn't register with me.  Thanks!