How to deal with quotes? Error: Heterogeneous string detected, starting with " and ending with '.__


            disp("Error: arg1 is not of expected type 'Block', 'tlist', or 'hlists'.");
                                                      ^^
Error: Heterogeneous string detected, starting with " and ending with '.
genlib: Error in file C:\Users\Vimal\Desktop\spacecraft-gnc-tbx-devel-kalman-filter-block\macros\System_IF.sci.

I have found 3 solutions but its not working .

Correct Quotation Marks in disp Statements

Properly matching quotation marks is crucial. Here’s how to handle different scenarios:

  • Option 1: Use single quotes for the outer string and double quotes inside.

scilab

Copy code

disp('Error: arg1 is not of expected type "Block", "tlist", or "hlists".');
  • Option 2: Use double quotes for the outer string and escape inner double quotes.

scilab

Copy code

disp("Error: arg1 is not of expected type \"Block\", \"tlist\", or \"hlists\".");
  • Option 3: Use double quotes for the outer string and single quotes inside.

scilab

Copy code

disp("Error: arg1 is not of expected type 'Block', 'tlist', or 'hlists'.");

Answered in gitlab issue

1 Like