Brother International TD-4420TN FBPL Command Reference - Page 173
STRCOMP, Description, Syntax, Example, See Also
![]() |
View all Brother International TD-4420TN manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 173 highlights
10.41 STRCOMP() Description Returns -1, 0, or 1, based on the result of a string comparison. Syntax STRCOMP(str1$,str2$[,comp]) Parameter str1$ Str2$ Comp Description Required. Any valid string expression. Required. Any valid string expression. Optional. Specifies the type of string comparison. 0: Binary comparison. Default. 1: Textual comparison. The comparison is case-insensitive. Condition str1$ sorts ahead of str2$ str1$ is equal to str2$ str1$ sorts after str2$ Return value -1 0 1 Example Sample Code DOWNLOAD "TEST.BAS" STR1$ = "ABCD" STR2$ = "abcd" result1 = STRCOMP(STR1$,STR2$) result2 = STRCOMP(STR1$,STR2$,1) result3 = STRCOMP(STR2$,STR1$) SIZE 4,1 GAP 0,0 DIRECTION 1 CLS TEXT 100,10,"3",0,1,1,STR$(result1 STR1$+"¥["] sorts ahead of ¥["]" +STR2$+" ¥["]" TEXT 100,60,"3",0,1,1," " +STR$(result2)+": ¥["]"+STR1$+"¥["] is equal to ¥["]"+STR2$+"¥["]" TEXT 100,110,"3",0,1,1," "+STR$(result3)+": ¥["]"+STR2$+"¥["] sorts after ¥["]"+STR1$+"¥["]" PRINT 1 EOP TEST Result See Also INSTR() 168
![](/manual_guide/products/brother-international-td4420tn-fbpl-command-reference-a4fb318/173.png)