[Scilab-users] Editing variables during Scilab script execution

Rafael Guera jrafaelbguerra at hotmail.com
Sun Aug 2 13:00:14 CEST 2015


Dear Scilabers,
 
Is there a simple way to interactively edit a text variable with multiple lines
of text during a Scilab script execution? (variable defined as a vector of
strings in example below)
 
// Execute script from Scinotes
 
M= char(...
'this is line#1 ', ...
'this is line#2 ', ...
'this is line#3')';
 
defined= %F;
while(~defined)
  printf('Currently M is:\n')
  for i=1:size(M,2)    
      printf('%s\n',M(i))
  end
  printf('\nEnter (1) to edit text\n')
  printf('Enter (2) to exit loop\n')
  str=input("Choose option: ", "string");
  [op, ierr]=evstr(str);
  if op==1 then
     editvar M;
     input('Enter when finished editing');
  elseif op==2 then
     defined= %T;
  end
end
 
printf('\nFinished editing and M is:\n')
for i=1:size(M,2)    
  printf('%s\n',M(i))
end
 
printf('\n\n Left the script, type now M to check its content:\n')
 
//***
 
As you can see from the above example, editvar does not behave properly during a
Scilab script execution.
This was reported in Bug#10922 and it seems that Scilab 6.0.0 alpha1 still
shares the same issue.
 
If someone knows of a workaround I would appreciate.
 
Thanks and regards,
 
Rafael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20150802/6813cf18/attachment.htm>


More information about the users mailing list