String / character array comparisons

Topics related to the use of Oberon language features
Locked
kevinhely
Posts: 29
Joined: Wed May 18, 2011 3:35 am

String / character array comparisons

Post by kevinhely » Wed Jan 09, 2013 5:26 pm

Is comparison s = t allowed, where s is a string and t is an array of characters? (Also, the same question for <.)

cfbsoftware
Site Admin
Posts: 525
Joined: Fri Dec 31, 2010 12:30 pm
Contact:

Re: String / character array comparisons

Post by cfbsoftware » Sat Jan 12, 2013 11:07 pm

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'.

Locked