[Bugzilla] [Bug 15488] Samuel GOUGEON has changed component
bugzilla.admin at scilab.org
bugzilla.admin at scilab.org
Fri Mar 16 04:07:15 CET 2018
http://bugzilla.scilab.org/show_bug.cgi?id=15488
--------- Bug Summary -----------
string macro treats integer types as double
---------- Changed by ------------
sgougeon at free.fr
---------- What changed ----------
component
Samuel GOUGEON <sgougeon at free.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|Install |Strings
--- Comment #1 from Samuel GOUGEON <sgougeon at free.fr> ---
The %i_string() still exists but is not actually called.
The following script would do the job for any array of encoded integers:
function str=%i_string(i)
s = size(i)
S = list();
for j = s
S($+1) = j
end
str = stripblanks(matrix(msprintf("%21d\n",i(:)), S(:)))
endfunction
Example:
-------
--> x = int32(grand(2,2,2,"uin",0,2^31-1))
x =
(:,:,1)
2039073006 1812852786
1684602222 746745227
(:,:,2)
735241234 136721026
1296707006 1359573808
--> %i_string(x)
%i_string
ans =
(:,:,1)
!2039073006 1812852786 !
!1684602222 746745227 !
(:,:,2)
!735241234 136721026 !
!1296707006 1359573808 !
It seems that when preparing Scilab 6, some manpower has been put to hardcode many string outputs that were well done with macros, like this one, as
cells and struct ones.
Unfortunately, for all these ones, the result is much poorer, much harder to fix or upgrade, and are problematic.
I would have set some other priorities about hardcoding...
--
You are receiving this mail because:
You are watching all bug changes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/bugzilla/attachments/20180316/3cc6657b/attachment.htm>
More information about the Bugzilla
mailing list