Page 1 of 1

String / character array comparisons

Posted: Wed Jan 09, 2013 5:26 pm
by kevinhely
Is comparison s = t allowed, where s is a string and t is an array of characters? (Also, the same question for <.)

Re: String / character array comparisons

Posted: Sat Jan 12, 2013 11:07 pm
by cfbsoftware
My initial response to your question was Yes. However, although the current versions of Astrobe allow such comparisons my latest thoughts are that this behaviour does not conform with the revision of the Oberon Language Report that was used when implementing the compiler. We may have to add a 'Compare' function to our Strings library to handle these cases. I shall investigate further.

Update 17 Jan 2012: Kevin Hely has now reported on the Oberon Community Platform Forum that Niklaus Wirth has confirmed that the answer to his original question in this topic is 'YES'.