The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
[SOLVED] Bug with INSTRING
10-26-2016, 08:37 AM (This post was last modified: 10-28-2016 07:19 AM by CH3791.)
Post: #1
[SOLVED] Bug with INSTRING
Hello,

When I put INSTRING("√7","√") directly into CAS, it returns 1 as expected.

However when I put the exact same thing into programs, it returns 0. CAS or non-CAS, it doesn't matter.
Code:
EXPORT norm_instring_bug(expression)
BEGIN
  return instring(string(expression),"√");
END;

#cas
cas_instring_bug(expression):=
BEGIN
  return instring(string(expression),"√");
END;
#end

It might have something to do with Prime auto-adding spaces, which I found to have caused some issues during my testing. For example, Prime changes "√" to " √ ". If we now calculate INSTRING("√7"," √ "), it returns 0.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
[SOLVED] Bug with INSTRING - CH3791 - 10-26-2016 08:37 AM
RE: Bug with INSTRING - StephenG1CMZ - 10-26-2016, 01:02 PM
RE: Bug with INSTRING - Han - 10-26-2016, 06:49 PM
RE: Bug with INSTRING - toml_12953 - 10-27-2016, 06:41 AM
RE: Bug with INSTRING - CH3791 - 10-27-2016, 09:36 AM
RE: Bug with INSTRING - StephenG1CMZ - 10-27-2016, 01:47 PM
RE: Bug with INSTRING - CH3791 - 10-28-2016, 07:10 AM
RE: [SOLVED] Bug with INSTRING - Jan_D - 11-19-2016, 09:11 PM
RE: [SOLVED] Bug with INSTRING - CH3791 - 11-21-2016, 10:38 AM
RE: [SOLVED] Bug with INSTRING - Jan_D - 11-21-2016, 03:45 PM



User(s) browsing this thread: 1 Guest(s)