Talk:String comparison: Difference between revisions

 
(2 intermediate revisions by 2 users not shown)
Line 8:
[[User:Markhobley|Markhobley]] 21:08, 23 February 2013 (UTC)
:How's it now? The distinction I'm trying to get across is that some operators <em>MIGHT</em> give you string comparison semantics (or some other semantics), while other operators <em>MUST</em> give you string comparison semantics (or fail). It's an important distinction in some languages, or at least in Perl 6. <tt>:-)</tt> But even for languages that only give you polymorphic operators (Python) or coercive operators (Perl 5--at least in the absence of overloading), it's still an important semantic difference. --[[User:TimToady|TimToady]] 00:41, 24 February 2013 (UTC)
 
:if a string operator operates on a non-string it can:
:# Complain about it.
:# Or if the non-string has an agreed string representation it can convert the non-string then work on the string result.
:Some languages do the former, some the latter. (It's also complicated by some languages having only generic comparison operators, i.e. comparing numbers and strings use the exact same operator). --[[User:Paddy3118|Paddy3118]] 10:56, 24 February 2013 (UTC)
 
:: Excellent. Cheers guys! That looks a lot better. [[User:Markhobley|Markhobley]] 11:19, 24 February 2013 (UTC)
 
== REXX ==
Line 19 ⟶ 26:
 
[[User:Markhobley|Markhobley]] 22:38, 23 February 2013 (UTC)
 
No biggie; but it's a shame that you chose to use &quot;<tt>!=</tt>&quot; instead of &quot;<tt>\=</tt>&quot; as the '''NOT EQUAL''' operator. It's only that choice that stopped the program compiling directly to [[NetRexx]] too. That would have made this one of the few program examples in the [[REXX]] family to cross all dialects.
 
--[[User:Alansam|Alansam]] 01:10, 28 March 2013 (UTC)
Anonymous user