[Scilab-users] ?= Incorrect color in functio
Federico Miyara
fmiyara at fceia.unr.edu.ar
Fri Apr 10 18:47:48 CEST 2020
Antoine,
Yes, I've filed it as
https://bugzilla.scilab.org/show_bug.cgi?id=16405
Regards,
Federico Miyara
On 10/04/2020 11:43, Antoine Monmayrant wrote:
> Yes, quite funny if we write it that way:
>
> ////////////////////////////////
> function a()
> if %t then
> what_ever_you_want_that_ends_with_end
> end
> endfunction
>
> function b()
> if %t then
> or_that_ends_with_end()
> end
> endfunction
> ////////////////////////////////
>
> Frederico, do you think you could fill a bug report?
>
> Cheers,
>
> Antoine
>
> Le Vendredi, Avril 10, 2020 16:17 CEST, Claus Futtrup <cfuttrup at gmail.com> a écrit:
>
>> HA HA :-D ... it's funny!
>>
>> Cheers,
>> Claus
>>
>> On 10.04.2020 16:09, Antoine Monmayrant wrote:
>>> OK, I think I nailed it:
>>>
>>> function a()
>>> if % then
>>> end()
>>> end
>>> endfunction
>>>
>>> It's the "end()" in "legend()" that sends the parser off the trail: it thinks that the if block is over (as it has found "if", "then" & leg"end"() ) and then treats the next "end" as matching the "function"
>>>
>>> Antoine
>>>
>>>
>>> Le Vendredi, Avril 10, 2020 15:28 CEST, Federico Miyara <fmiyara at fceia.unr.edu.ar> a écrit:
>>>
>>>> Dear all,
>>>>
>>>> When writing the following script in SciNotes (v. 6.1):
>>>>
>>>> function y = testcolor(t)
>>>> if 1==1
>>>> y = sinc(t)
>>>> plot(t, y)
>>>> legend("sinc")
>>>> else
>>>> y = 1
>>>> end
>>>> endfunction
>>>>
>>>> the end of the if structure appears with the same brownish color as the
>>>> endfunction. Strangely, if copying and pasting here or into a word
>>>> processor document, the color is the expected purple (that's why I
>>>> removed all colors in this message).
>>>>
>>>> It seems that the culprit is the legend clause.
>>>>
>>>> Regards,
>>>>
>>>> Federico Miyara
>>>>
>>>> _______________________________________________
>>>> users mailing list
>>>> users at lists.scilab.org
>>>> http://lists.scilab.org/mailman/listinfo/users
>>>>
>>> _______________________________________________
>>> users mailing list
>>> users at lists.scilab.org
>>> http://lists.scilab.org/mailman/listinfo/users
>>
>>
>> --
>> This email has been checked for viruses by Avast antivirus software.
>> https://www.avast.com/antivirus
>>
>> _______________________________________________
>> users mailing list
>> users at lists.scilab.org
>> http://lists.scilab.org/mailman/listinfo/users
>>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
>
>
More information about the users
mailing list