Anonymous user
String comparison: Difference between revisions
m
→{{header|uBasic/4tH}}
imported>Thebeez |
|||
Line 1,255:
<pre>Igual que la entrada de FreeBASIC.</pre>
==={{header|uBasic/4tH}}===
{{works with|
uBasic/4tH provides a builtin, case insensitive function to compare two strings, called <code>COMP()</code> which returns either a negative, zero or positive value, just like <code>strcmp()</code>. In order to compare two strings case sensitive, a user defined function is required.
<syntaxhighlight lang="text">Print "Case sensitive"
Print "=============="
Print Show (FUNC(_Eval(FUNC(_StrCmp
Print Show (FUNC(_Eval(FUNC(_StrCmp
Print Show (FUNC(_Eval(FUNC(_StrCmp
Print Show (FUNC(_Eval(FUNC(_StrCmp
Print Show (FUNC(_Eval(FUNC(_StrCmp
Print
Line 1,291:
_Eval ' evaluate result
Param (1)
If a@ = 0 Then Return
If a@ > 0 Then Return
Return
Output:
<pre>
|