summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClément DAVID <clement.david@esi-group.com>2020-07-17 16:35:13 +0200
committerClément DAVID <clement.david@esi-group.com>2020-07-17 16:35:13 +0200
commit18917f652f72de960136f90ec7930c2e8471032b (patch)
tree0fa51a7a9d61102bb28f9d23a76799da7fff5009
parent8937019ec7463bc7e92352d783b18861f6bc2723 (diff)
parent6660bea76b4e33f9caf9faac0333a790b02870b5 (diff)
downloadscilab-18917f652f72de960136f90ec7930c2e8471032b.zip
scilab-18917f652f72de960136f90ec7930c2e8471032b.tar.gz
Merge origin/6.1 into master
Change-Id: I4178a77be534c343bf59663bb4cc3bed4b437070
-rw-r--r--scilab/CHANGES.md50
-rwxr-xr-xscilab/bin/scilab4
-rw-r--r--scilab/modules/ast/includes/system_env/configvariable.hxx6
-rw-r--r--scilab/modules/ast/includes/types/sparse.hxx2
-rw-r--r--scilab/modules/ast/src/cpp/ast/run_AssignExp.hpp19
-rw-r--r--scilab/modules/ast/src/cpp/ast/runvisitor.cpp6
-rw-r--r--scilab/modules/ast/src/cpp/ast/visitor_common.cpp5
-rw-r--r--scilab/modules/ast/src/cpp/operations/types_subtraction.cpp14
-rw-r--r--scilab/modules/ast/src/cpp/symbol/context.cpp15
-rw-r--r--scilab/modules/ast/src/cpp/system_env/configvariable.cpp14
-rw-r--r--scilab/modules/ast/src/cpp/types/arrayof.cpp5
-rw-r--r--scilab/modules/ast/src/cpp/types/cell.cpp3
-rw-r--r--scilab/modules/ast/src/cpp/types/double.cpp31
-rw-r--r--scilab/modules/ast/src/cpp/types/sparse.cpp78
-rw-r--r--scilab/modules/ast/src/cpp/types/tostring_common.cpp17
-rw-r--r--scilab/modules/ast/tests/nonreg_tests/bug_14245.tst3
-rw-r--r--scilab/modules/ast/tests/nonreg_tests/bug_14361.dia.ref356
-rw-r--r--scilab/modules/ast/tests/nonreg_tests/bug_14361.tst395
-rw-r--r--scilab/modules/ast/tests/nonreg_tests/bug_14487.tst85
-rw-r--r--scilab/modules/ast/tests/nonreg_tests/bug_15781.dia.ref117
-rw-r--r--scilab/modules/ast/tests/nonreg_tests/bug_15781.tst13
-rw-r--r--scilab/modules/ast/tests/nonreg_tests/bug_16122.tst21
-rw-r--r--scilab/modules/ast/tests/nonreg_tests/bug_16350.tst (renamed from scilab/modules/ast/tests/nonreg_tests/bug_14245.dia.ref)23
-rw-r--r--scilab/modules/ast/tests/nonreg_tests/bug_16373.dia.ref22
-rw-r--r--scilab/modules/ast/tests/nonreg_tests/bug_16373.tst18
-rw-r--r--scilab/modules/ast/tests/nonreg_tests/bug_16397.tst26
-rw-r--r--scilab/modules/ast/tests/nonreg_tests/bug_16403.tst34
-rw-r--r--scilab/modules/ast/tests/nonreg_tests/bug_16449.tst21
-rw-r--r--scilab/modules/ast/tests/nonreg_tests/bug_16459.dia.ref34
-rw-r--r--scilab/modules/ast/tests/nonreg_tests/bug_16459.tst18
-rw-r--r--scilab/modules/ast/tests/nonreg_tests/bug_16473.tst25
-rw-r--r--scilab/modules/ast/tests/nonreg_tests/bug_16483.tst23
-rw-r--r--scilab/modules/ast/tests/unit_tests/concatenation.tst12
-rw-r--r--scilab/modules/ast/tests/unit_tests/krondivide.tst18
-rw-r--r--scilab/modules/ast/tests/unit_tests/parser.dia.ref640
-rw-r--r--scilab/modules/ast/tests/unit_tests/parser.tst8
-rw-r--r--scilab/modules/atoms/macros/atoms_internals/atomsDownload.sci2
-rw-r--r--scilab/modules/core/help/en_US/1_keywords/backslash.xml8
-rw-r--r--scilab/modules/core/help/en_US/1_keywords/brackets.xml84
-rw-r--r--scilab/modules/core/help/en_US/2_control_flow/if.xml8
-rw-r--r--scilab/modules/core/help/en_US/2_control_flow/pause.xml6
-rw-r--r--scilab/modules/core/help/en_US/2_control_flow/resume.xml5
-rw-r--r--scilab/modules/core/help/en_US/2_control_flow/return.xml5
-rw-r--r--scilab/modules/core/help/en_US/2_control_flow/select.xml11
-rw-r--r--scilab/modules/core/help/en_US/2_control_flow/try.xml4
-rw-r--r--scilab/modules/core/help/en_US/2_control_flow/while.xml20
-rw-r--r--scilab/modules/core/help/fr_FR/1_keywords/backslash.xml8
-rw-r--r--scilab/modules/core/help/fr_FR/1_keywords/brackets.xml84
-rw-r--r--scilab/modules/core/help/fr_FR/2_control_flow/if.xml8
-rw-r--r--scilab/modules/core/help/fr_FR/2_control_flow/pause.xml6
-rw-r--r--scilab/modules/core/help/fr_FR/2_control_flow/resume.xml5
-rw-r--r--scilab/modules/core/help/fr_FR/2_control_flow/return.xml5
-rw-r--r--scilab/modules/core/help/fr_FR/2_control_flow/select.xml11
-rw-r--r--scilab/modules/core/help/fr_FR/2_control_flow/then.xml2
-rw-r--r--scilab/modules/core/help/fr_FR/2_control_flow/try.xml4
-rw-r--r--scilab/modules/core/help/fr_FR/2_control_flow/while.xml2
-rw-r--r--scilab/modules/core/help/ja_JP/1_keywords/backslash.xml8
-rw-r--r--scilab/modules/core/help/ja_JP/2_control_flow/if.xml8
-rw-r--r--scilab/modules/core/help/ja_JP/2_control_flow/pause.xml6
-rw-r--r--scilab/modules/core/help/ja_JP/2_control_flow/resume.xml5
-rw-r--r--scilab/modules/core/help/ja_JP/2_control_flow/return.xml5
-rw-r--r--scilab/modules/core/help/ja_JP/2_control_flow/select.xml11
-rw-r--r--scilab/modules/core/help/ja_JP/2_control_flow/try.xml7
-rw-r--r--scilab/modules/core/help/ja_JP/2_control_flow/while.xml20
-rw-r--r--scilab/modules/core/help/pt_BR/1_keywords/backslash.xml8
-rw-r--r--scilab/modules/core/help/pt_BR/2_control_flow/if.xml8
-rw-r--r--scilab/modules/core/help/pt_BR/2_control_flow/pause.xml6
-rw-r--r--scilab/modules/core/help/pt_BR/2_control_flow/resume.xml5
-rw-r--r--scilab/modules/core/help/pt_BR/2_control_flow/return.xml5
-rw-r--r--scilab/modules/core/help/pt_BR/2_control_flow/select.xml30
-rw-r--r--scilab/modules/core/help/pt_BR/2_control_flow/try.xml7
-rw-r--r--scilab/modules/core/help/pt_BR/2_control_flow/while.xml8
-rw-r--r--scilab/modules/core/help/ru_RU/1_keywords/backslash.xml16
-rw-r--r--scilab/modules/core/help/ru_RU/1_keywords/brackets.xml482
-rw-r--r--scilab/modules/core/help/ru_RU/1_keywords/getscilabkeywords.xml57
-rw-r--r--scilab/modules/core/help/ru_RU/2_control_flow/if.xml8
-rw-r--r--scilab/modules/core/help/ru_RU/2_control_flow/pause.xml6
-rw-r--r--scilab/modules/core/help/ru_RU/2_control_flow/resume.xml7
-rw-r--r--scilab/modules/core/help/ru_RU/2_control_flow/return.xml2
-rw-r--r--scilab/modules/core/help/ru_RU/2_control_flow/select.xml11
-rw-r--r--scilab/modules/core/help/ru_RU/2_control_flow/try.xml4
-rw-r--r--scilab/modules/core/help/ru_RU/2_control_flow/while.xml17
-rw-r--r--scilab/modules/core/sci_gateway/cpp/sci_exists.cpp26
-rw-r--r--scilab/modules/core/sci_gateway/cpp/sci_mode.cpp4
-rw-r--r--scilab/modules/core/src/cpp/InitScilab.cpp2
-rw-r--r--scilab/modules/core/tests/nonreg_tests/bug_16358.tst22
-rw-r--r--scilab/modules/core/tests/unit_tests/exists.dia.ref67
-rw-r--r--scilab/modules/core/tests/unit_tests/exists.tst10
-rw-r--r--scilab/modules/data_structures/help/en_US/setfield.xml130
-rw-r--r--scilab/modules/data_structures/help/fr_FR/setfield.xml156
-rw-r--r--scilab/modules/data_structures/help/ja_JP/setfield.xml133
-rw-r--r--scilab/modules/data_structures/help/pt_BR/setfield.xml136
-rw-r--r--scilab/modules/data_structures/help/ru_RU/setfield.xml143
-rw-r--r--scilab/modules/development_tools/help/en_US/assert/assert_checkequal.xml23
-rw-r--r--scilab/modules/development_tools/help/ja_JP/assert/assert_checkequal.xml21
-rw-r--r--scilab/modules/development_tools/help/ru_RU/assert/assert_checkequal.xml43
-rw-r--r--scilab/modules/development_tools/macros/assert/assert_checkequal.sci216
-rw-r--r--scilab/modules/development_tools/tests/unit_tests/assert/checkequal.tst17
-rw-r--r--scilab/modules/differential_equations/help/en_US/int2d.xml26
-rw-r--r--scilab/modules/differential_equations/help/ja_JP/int2d.xml43
-rw-r--r--scilab/modules/differential_equations/help/pt_BR/int2d.xml26
-rw-r--r--scilab/modules/differential_equations/help/ru_RU/int2d.xml26
-rw-r--r--scilab/modules/elementary_functions/help/en_US/bitwise/bitget.xml190
-rw-r--r--scilab/modules/elementary_functions/help/en_US/complex/complex.xml129
-rw-r--r--scilab/modules/elementary_functions/help/en_US/elementarymatrices/perms.xml (renamed from scilab/modules/elementary_functions/help/en_US/setoperations/perms.xml)2
-rw-r--r--scilab/modules/elementary_functions/help/en_US/elementarymatrices/random/grand.xml6
-rw-r--r--scilab/modules/elementary_functions/help/en_US/elementarymatrices/random/sample.xml (renamed from scilab/modules/statistics/help/en_US/6_sampling/sample.xml)0
-rw-r--r--scilab/modules/elementary_functions/help/en_US/elementarymatrices/random/samplef.xml (renamed from scilab/modules/statistics/help/en_US/6_sampling/samplef.xml)0
-rw-r--r--scilab/modules/elementary_functions/help/en_US/elementarymatrices/random/samwr.xml (renamed from scilab/modules/statistics/help/en_US/6_sampling/samwr.xml)0
-rw-r--r--scilab/modules/elementary_functions/help/en_US/elementarymatrices/repmat.xml141
-rw-r--r--scilab/modules/elementary_functions/help/en_US/matrixmanipulation/squeeze.xml91
-rw-r--r--scilab/modules/elementary_functions/help/en_US/matrixoperations/or.xml4
-rw-r--r--scilab/modules/elementary_functions/help/en_US/matrixoperations/sum.xml65
-rw-r--r--scilab/modules/elementary_functions/help/en_US/searchandsort/find.xml227
-rw-r--r--scilab/modules/elementary_functions/help/en_US/searchandsort/gsort.xml52
-rw-r--r--scilab/modules/elementary_functions/help/en_US/setoperations/unique.xml87
-rw-r--r--scilab/modules/elementary_functions/help/en_US/trigonometry/csc.xml2
-rw-r--r--scilab/modules/elementary_functions/help/en_US/trigonometry/cscd.xml2
-rw-r--r--scilab/modules/elementary_functions/help/fr_FR/elementarymatrices/perms.xml (renamed from scilab/modules/elementary_functions/help/fr_FR/setoperations/perms.xml)2
-rw-r--r--scilab/modules/elementary_functions/help/fr_FR/elementarymatrices/random/grand.xml18
-rw-r--r--scilab/modules/elementary_functions/help/fr_FR/elementarymatrices/random/sample.xml (renamed from scilab/modules/statistics/help/fr_FR/6_sampling/sample.xml)0
-rw-r--r--scilab/modules/elementary_functions/help/fr_FR/elementarymatrices/random/samplef.xml (renamed from scilab/modules/statistics/help/fr_FR/6_sampling/samplef.xml)0
-rw-r--r--scilab/modules/elementary_functions/help/fr_FR/elementarymatrices/random/samwr.xml (renamed from scilab/modules/statistics/help/fr_FR/6_sampling/samwr.xml)0
-rw-r--r--scilab/modules/elementary_functions/help/fr_FR/elementarymatrices/repmat.xml144
-rw-r--r--scilab/modules/elementary_functions/help/fr_FR/matrixmanipulation/squeeze.xml91
-rw-r--r--scilab/modules/elementary_functions/help/fr_FR/matrixoperations/or.xml4
-rw-r--r--scilab/modules/elementary_functions/help/fr_FR/matrixoperations/sum.xml52
-rw-r--r--scilab/modules/elementary_functions/help/fr_FR/searchandsort/find.xml243
-rw-r--r--scilab/modules/elementary_functions/help/fr_FR/setoperations/unique.xml113
-rw-r--r--scilab/modules/elementary_functions/help/ja_JP/complex/complex.xml124
-rw-r--r--scilab/modules/elementary_functions/help/ja_JP/elementarymatrices/random/grand.xml12
-rw-r--r--scilab/modules/elementary_functions/help/ja_JP/elementarymatrices/random/sample.xml (renamed from scilab/modules/statistics/help/ja_JP/6_sampling/sample.xml)0
-rw-r--r--scilab/modules/elementary_functions/help/ja_JP/elementarymatrices/random/samplef.xml (renamed from scilab/modules/statistics/help/ja_JP/6_sampling/samplef.xml)0
-rw-r--r--scilab/modules/elementary_functions/help/ja_JP/elementarymatrices/random/samwr.xml (renamed from scilab/modules/statistics/help/ja_JP/6_sampling/samwr.xml)0
-rw-r--r--scilab/modules/elementary_functions/help/ja_JP/elementarymatrices/repmat.xml125
-rw-r--r--scilab/modules/elementary_functions/help/ja_JP/matrixmanipulation/squeeze.xml126
-rw-r--r--scilab/modules/elementary_functions/help/ja_JP/matrixoperations/sum.xml209
-rw-r--r--scilab/modules/elementary_functions/help/ja_JP/searchandsort/find.xml315
-rw-r--r--scilab/modules/elementary_functions/help/ja_JP/setoperations/unique.xml110
-rw-r--r--scilab/modules/elementary_functions/help/pt_BR/matrixmanipulation/squeeze.xml67
-rw-r--r--scilab/modules/elementary_functions/help/pt_BR/matrixoperations/sum.xml76
-rw-r--r--scilab/modules/elementary_functions/help/pt_BR/searchandsort/find.xml219
-rw-r--r--scilab/modules/elementary_functions/help/pt_BR/setoperations/unique.xml101
-rw-r--r--scilab/modules/elementary_functions/help/ru_RU/bitwise/bitget.xml175
-rw-r--r--scilab/modules/elementary_functions/help/ru_RU/complex/complex.xml129
-rw-r--r--scilab/modules/elementary_functions/help/ru_RU/elementarymatrices/random/grand.xml6
-rw-r--r--scilab/modules/elementary_functions/help/ru_RU/elementarymatrices/repmat.xml148
-rw-r--r--scilab/modules/elementary_functions/help/ru_RU/matrixmanipulation/squeeze.xml98
-rw-r--r--scilab/modules/elementary_functions/help/ru_RU/matrixoperations/sum.xml50
-rw-r--r--scilab/modules/elementary_functions/help/ru_RU/searchandsort/find.xml290
-rw-r--r--scilab/modules/elementary_functions/help/ru_RU/searchandsort/gsort.xml659
-rw-r--r--scilab/modules/elementary_functions/help/ru_RU/setoperations/unique.xml92
-rw-r--r--scilab/modules/elementary_functions/help/ru_RU/trigonometry/csc.xml5
-rw-r--r--scilab/modules/elementary_functions/help/ru_RU/trigonometry/cscd.xml5
-rw-r--r--scilab/modules/elementary_functions/macros/%b_gsort.sci1
-rw-r--r--scilab/modules/elementary_functions/macros/%s_y_s.sci6
-rw-r--r--scilab/modules/elementary_functions/macros/%sp_gsort.sci292
-rw-r--r--scilab/modules/elementary_functions/macros/%spb_gsort.sci20
-rw-r--r--scilab/modules/elementary_functions/macros/bitget.sci21
-rw-r--r--scilab/modules/elementary_functions/macros/complex.sci41
-rw-r--r--scilab/modules/elementary_functions/macros/repmat.sci2
-rw-r--r--scilab/modules/elementary_functions/macros/sample.sci (renamed from scilab/modules/statistics/macros/sample.sci)0
-rw-r--r--scilab/modules/elementary_functions/macros/samplef.sci (renamed from scilab/modules/statistics/macros/samplef.sci)0
-rw-r--r--scilab/modules/elementary_functions/macros/samwr.sci (renamed from scilab/modules/statistics/macros/samwr.sci)0
-rw-r--r--scilab/modules/elementary_functions/macros/unique.sci192
-rw-r--r--scilab/modules/elementary_functions/sci_gateway/cpp/elem_func_gw.cpp7
-rw-r--r--scilab/modules/elementary_functions/sci_gateway/cpp/sci_matrix.cpp18
-rw-r--r--scilab/modules/elementary_functions/tests/nonreg_tests/bug_15842.tst32
-rw-r--r--scilab/modules/elementary_functions/tests/nonreg_tests/bug_16452.tst20
-rw-r--r--scilab/modules/elementary_functions/tests/nonreg_tests/bug_16454.tst26
-rw-r--r--scilab/modules/elementary_functions/tests/nonreg_tests/bug_16463.tst25
-rw-r--r--scilab/modules/elementary_functions/tests/unit_tests/bitget.tst64
-rw-r--r--scilab/modules/elementary_functions/tests/unit_tests/complex.dia.ref132
-rw-r--r--scilab/modules/elementary_functions/tests/unit_tests/complex.tst167
-rw-r--r--scilab/modules/elementary_functions/tests/unit_tests/gsort_boolean.tst4
-rw-r--r--scilab/modules/elementary_functions/tests/unit_tests/gsort_sparse.tst163
-rw-r--r--scilab/modules/elementary_functions/tests/unit_tests/sample.dia.ref (renamed from scilab/modules/statistics/tests/unit_tests/sample.dia.ref)0
-rw-r--r--scilab/modules/elementary_functions/tests/unit_tests/sample.tst (renamed from scilab/modules/statistics/tests/unit_tests/sample.tst)0
-rw-r--r--scilab/modules/elementary_functions/tests/unit_tests/samplef.dia.ref (renamed from scilab/modules/statistics/tests/unit_tests/samplef.dia.ref)0
-rw-r--r--scilab/modules/elementary_functions/tests/unit_tests/samplef.tst (renamed from scilab/modules/statistics/tests/unit_tests/samplef.tst)0
-rw-r--r--scilab/modules/elementary_functions/tests/unit_tests/samwr.dia.ref (renamed from scilab/modules/statistics/tests/unit_tests/samwr.dia.ref)0
-rw-r--r--scilab/modules/elementary_functions/tests/unit_tests/samwr.tst (renamed from scilab/modules/statistics/tests/unit_tests/samwr.tst)0
-rw-r--r--scilab/modules/elementary_functions/tests/unit_tests/unique.tst435
-rw-r--r--scilab/modules/elementary_functions/tests/unit_tests/unique_sparse.tst60
-rw-r--r--scilab/modules/elementary_functions/tests/unit_tests/zeros.tst9
-rw-r--r--scilab/modules/external_objects_java/help/en_US/jinvoke.xml2
-rw-r--r--scilab/modules/external_objects_java/help/ja_JP/jinvoke.xml2
-rw-r--r--scilab/modules/external_objects_java/tests/nonreg_tests/bug_16401.tst25
-rw-r--r--scilab/modules/fileio/help/en_US/mputstr.xml135
-rw-r--r--scilab/modules/fileio/help/ja_JP/mputstr.xml218
-rw-r--r--scilab/modules/fileio/help/ru_RU/mputstr.xml143
-rw-r--r--scilab/modules/fileio/sci_gateway/cpp/sci_mputstr.cpp2
-rw-r--r--scilab/modules/functions/help/en_US/libraries/libraryinfo.xml186
-rw-r--r--scilab/modules/functions/help/ja_JP/libraries/libraryinfo.xml236
-rw-r--r--scilab/modules/functions/help/pt_BR/libraries/libraryinfo.xml178
-rw-r--r--scilab/modules/functions/help/ru_RU/libraries/libraryinfo.xml225
-rw-r--r--scilab/modules/graphics/help/en_US/2d_plot/champ.xml169
-rw-r--r--scilab/modules/graphics/help/en_US/2d_plot/plot.xml15
-rw-r--r--scilab/modules/graphics/help/en_US/Graphics.xml8
-rw-r--r--scilab/modules/graphics/help/en_US/axes_operations/axes_properties.xml36
-rw-r--r--scilab/modules/graphics/help/en_US/axes_operations/sda.xml27
-rw-r--r--scilab/modules/graphics/help/en_US/color_management/colorbar.xml5
-rw-r--r--scilab/modules/graphics/help/en_US/figure_operations/clf.xml5
-rw-r--r--scilab/modules/graphics/help/en_US/figure_operations/xname.xml20
-rw-r--r--scilab/modules/graphics/help/en_US/polygon/polyline_properties.xml85
-rw-r--r--scilab/modules/graphics/help/en_US/text/text_properties.xml40
-rw-r--r--scilab/modules/graphics/help/fr_FR/Graphics.xml8
-rw-r--r--scilab/modules/graphics/help/fr_FR/figure_operations/xname.xml19
-rw-r--r--scilab/modules/graphics/help/ja_JP/2d_plot/champ.xml292
-rw-r--r--scilab/modules/graphics/help/ja_JP/2d_plot/plot.xml16
-rw-r--r--scilab/modules/graphics/help/ja_JP/Graphics.xml8
-rw-r--r--scilab/modules/graphics/help/ja_JP/axes_operations/axes_properties.xml42
-rw-r--r--scilab/modules/graphics/help/ja_JP/axes_operations/sda.xml119
-rw-r--r--scilab/modules/graphics/help/ja_JP/figure_operations/xname.xml67
-rw-r--r--scilab/modules/graphics/help/ja_JP/polygon/polyline_properties.xml88
-rw-r--r--scilab/modules/graphics/help/ja_JP/text/text_properties.xml11
-rw-r--r--scilab/modules/graphics/help/pt_BR/2d_plot/champ.xml155
-rw-r--r--scilab/modules/graphics/help/pt_BR/2d_plot/plot.xml15
-rw-r--r--scilab/modules/graphics/help/pt_BR/Graphics.xml8
-rw-r--r--scilab/modules/graphics/help/pt_BR/axes_operations/axes_properties.xml43
-rw-r--r--scilab/modules/graphics/help/pt_BR/axes_operations/sda.xml28
-rw-r--r--scilab/modules/graphics/help/pt_BR/figure_operations/xname.xml19
-rw-r--r--scilab/modules/graphics/help/ru_RU/2d_plot/champ.xml144
-rw-r--r--scilab/modules/graphics/help/ru_RU/Graphics.xml10
-rw-r--r--scilab/modules/graphics/macros/%h_set.sci8
-rw-r--r--scilab/modules/graphics/macros/colorbar.sci15
-rw-r--r--scilab/modules/graphics/macros/getLineSpec.sci2
-rw-r--r--scilab/modules/graphics/macros/setPlotProperty.sci2
-rw-r--r--scilab/modules/graphics/sci_gateway/c/sci_xname.c3
-rw-r--r--scilab/modules/graphics/tests/nonreg_tests/bug_16366.tst24
-rw-r--r--scilab/modules/graphics/tests/nonreg_tests/bug_16406.tst32
-rw-r--r--scilab/modules/graphics/tests/unit_tests/colorbar.tst20
-rw-r--r--scilab/modules/gui/etc/helpbrowser_menubar.xml33
-rw-r--r--scilab/modules/gui/src/java/org/scilab/modules/gui/bridge/CallScilabBridge.java15
-rw-r--r--scilab/modules/helptools/data/configuration/scilab_macros.txt1
-rw-r--r--scilab/modules/helptools/data/configuration/scilab_primitives.txt9
-rw-r--r--scilab/modules/helptools/data/pages/homepage-en_US.html6
-rw-r--r--scilab/modules/helptools/data/pages/homepage-ru_RU.html244
-rw-r--r--scilab/modules/helptools/etc/images_md5.txt36
-rw-r--r--scilab/modules/helptools/images/_LaTeX_convol.xml_1.pngbin0 -> 1007 bytes
-rw-r--r--scilab/modules/helptools/images/_LaTeX_csc.xml_1.pngbin621 -> 0 bytes
-rw-r--r--scilab/modules/helptools/images/_LaTeX_csc.xml_2.pngbin511 -> 0 bytes
-rw-r--r--scilab/modules/helptools/images/_LaTeX_cscd.xml_1.pngbin621 -> 0 bytes
-rw-r--r--scilab/modules/helptools/images/_LaTeX_cscd.xml_2.pngbin511 -> 0 bytes
-rw-r--r--scilab/modules/helptools/images/_LaTeX_cspect.xml_1.pngbin0 -> 2944 bytes
-rw-r--r--scilab/modules/helptools/images/_LaTeX_delip.xml_1.pngbin0 -> 1420 bytes
-rw-r--r--scilab/modules/helptools/images/_LaTeX_eig.xml_1.pngbin385 -> 0 bytes
-rw-r--r--scilab/modules/helptools/images/_LaTeX_pspect.xml_1.pngbin0 -> 2944 bytes
-rw-r--r--scilab/modules/helptools/images/_MathML_convol.xml_1.pngbin792 -> 0 bytes
-rw-r--r--scilab/modules/helptools/images/_MathML_cspect.xml_1.pngbin1876 -> 0 bytes
-rw-r--r--scilab/modules/helptools/images/_MathML_delip.xml_1.pngbin897 -> 0 bytes
-rw-r--r--scilab/modules/helptools/images/_MathML_pspect.xml_1.pngbin1876 -> 0 bytes
-rw-r--r--scilab/modules/helptools/images/bode_en_US_2.pngbin19185 -> 11865 bytes
-rw-r--r--scilab/modules/helptools/images/bode_fr_FR_2.pngbin19185 -> 11006 bytes
-rw-r--r--scilab/modules/helptools/images/bode_ja_JP_2.pngbin19185 -> 11749 bytes
-rw-r--r--scilab/modules/helptools/images/bode_pt_BR_2.pngbin19185 -> 11255 bytes
-rw-r--r--scilab/modules/helptools/images/bode_ru_RU_2.pngbin19185 -> 11071 bytes
-rw-r--r--scilab/modules/helptools/images/champ_1.pngbin9563 -> 49499 bytes
-rw-r--r--scilab/modules/helptools/images/champ_2.pngbin12023 -> 37357 bytes
-rw-r--r--scilab/modules/helptools/images/champ_3.pngbin18455 -> 0 bytes
-rw-r--r--scilab/modules/helptools/images/datafit_1.pngbin16340 -> 18896 bytes
-rw-r--r--scilab/modules/helptools/images/datafit_2.pngbin27156 -> 0 bytes
-rw-r--r--scilab/modules/helptools/images/datafit_3.pngbin20538 -> 0 bytes
-rw-r--r--scilab/modules/helptools/images/datafit_4.pngbin12102 -> 0 bytes
-rw-r--r--scilab/modules/helptools/images/datafit_A.pngbin0 -> 11196 bytes
-rw-r--r--scilab/modules/helptools/images/datafit_B.pngbin0 -> 30270 bytes
-rw-r--r--scilab/modules/helptools/images/datafit_C.pngbin0 -> 7891 bytes
-rw-r--r--scilab/modules/helptools/images/dawson_1.pngbin0 -> 17657 bytes
-rw-r--r--scilab/modules/helptools/images/plot_1.pngbin15566 -> 20813 bytes
-rw-r--r--scilab/modules/helptools/images/polyline_properties_1.pngbin4906 -> 2905 bytes
-rw-r--r--scilab/modules/helptools/images/polyline_properties_2.pngbin7982 -> 4906 bytes
-rw-r--r--scilab/modules/helptools/images/polyline_properties_3.pngbin4960 -> 7982 bytes
-rw-r--r--scilab/modules/helptools/images/prettyprint_LaTeX_MathJax.pngbin91644 -> 113843 bytes
-rw-r--r--scilab/modules/helptools/macros/helpbrowser_menus_cb.sci103
-rw-r--r--scilab/modules/helptools/tests/unit_tests/helpbrowser.tst88
-rw-r--r--scilab/modules/io/macros/%_sodload.sci20
-rw-r--r--scilab/modules/io/tests/nonreg_tests/bug_16374.tst17
-rw-r--r--scilab/modules/io/tests/nonreg_tests/bug_16374_552.scgbin0 -> 140888 bytes
-rw-r--r--scilab/modules/linear_algebra/help/en_US/linear/lsq.xml16
-rw-r--r--scilab/modules/linear_algebra/help/ja_JP/linear/lsq.xml12
-rw-r--r--scilab/modules/linear_algebra/help/pt_BR/linear/lsq.xml14
-rw-r--r--scilab/modules/linear_algebra/help/ru_RU/linear/lsq.xml127
-rw-r--r--scilab/modules/m2sci/help/en_US/m2sci_equivalents/e/eig.xml3
-rw-r--r--scilab/modules/optimization/help/en_US/nonlinearleastsquares/datafit.xml513
-rw-r--r--scilab/modules/optimization/help/images/datafit_A.pngbin0 -> 11196 bytes
-rw-r--r--scilab/modules/optimization/help/images/datafit_B.pngbin0 -> 30270 bytes
-rw-r--r--scilab/modules/optimization/help/images/datafit_C.pngbin0 -> 7891 bytes
-rw-r--r--scilab/modules/output_stream/src/cpp/scilab_sprintf.cpp72
-rw-r--r--scilab/modules/output_stream/tests/nonreg_tests/bug_16370.tst23
-rw-r--r--scilab/modules/overloading/macros/%i_c_s.sci15
-rw-r--r--scilab/modules/overloading/macros/%i_f_s.sci15
-rw-r--r--scilab/modules/overloading/macros/%r_p.sci5
-rw-r--r--scilab/modules/overloading/macros/%s_c_i.sci15
-rw-r--r--scilab/modules/overloading/macros/%s_f_i.sci15
-rw-r--r--scilab/modules/overloading/macros/%s_r_sp.sci18
-rw-r--r--scilab/modules/overloading/macros/%sp_l_sp.sci35
-rw-r--r--scilab/modules/overloading/macros/%sp_r_s.sci18
-rw-r--r--scilab/modules/overloading/macros/%sp_r_sp.sci43
-rw-r--r--scilab/modules/overloading/macros/%sp_y_sp.sci22
-rw-r--r--scilab/modules/overloading/macros/%sp_z_sp.sci22
-rw-r--r--scilab/modules/overloading/tests/nonreg_tests/bug_16280.dia.ref59
-rw-r--r--scilab/modules/overloading/tests/nonreg_tests/bug_16280.tst27
-rw-r--r--scilab/modules/overloading/tests/unit_tests/concatenations_mixed.tst17
-rw-r--r--scilab/modules/preferences/help/en_US/preferences.xml3
-rw-r--r--scilab/modules/preferences/help/fr_FR/preferences.xml3
-rw-r--r--scilab/modules/preferences/help/ja_JP/preferences.xml3
-rw-r--r--scilab/modules/preferences/help/ru_RU/preferences.xml3
-rw-r--r--scilab/modules/scicos/sci_gateway/cpp/sci_scicosim.cpp5
-rw-r--r--scilab/modules/scicos/src/cpp/createblklist.cpp67
-rw-r--r--scilab/modules/scicos/tests/nonreg_tests/bug_16106.tst80
-rw-r--r--scilab/modules/signal_processing/help/en_US/correlation_convolution/convol.xml85
-rw-r--r--scilab/modules/signal_processing/help/en_US/spectral_estimation/cspect.xml191
-rw-r--r--scilab/modules/signal_processing/help/en_US/spectral_estimation/pspect.xml205
-rw-r--r--scilab/modules/signal_processing/help/ja_JP/correlation_convolution/convol.xml189
-rw-r--r--scilab/modules/signal_processing/help/ja_JP/spectral_estimation/cspect.xml391
-rw-r--r--scilab/modules/signal_processing/help/ja_JP/spectral_estimation/pspect.xml508
-rw-r--r--scilab/modules/signal_processing/help/ru_RU/correlation_convolution/convol.xml114
-rw-r--r--scilab/modules/signal_processing/help/ru_RU/spectral_estimation/cspect.xml253
-rw-r--r--scilab/modules/signal_processing/help/ru_RU/spectral_estimation/pspect.xml265
-rw-r--r--scilab/modules/slint/src/cpp/DeprecatedChecker.cpp3
-rw-r--r--scilab/modules/sparse/tests/unit_tests/sparse_divide.tst111
-rw-r--r--scilab/modules/special_functions/help/en_US/bessel.xml3
-rw-r--r--scilab/modules/special_functions/help/en_US/dawson.xml81
-rw-r--r--scilab/modules/special_functions/help/en_US/delip.xml78
-rw-r--r--scilab/modules/special_functions/help/fr_FR/delip.xml70
-rw-r--r--scilab/modules/special_functions/help/ja_JP/dawson.xml76
-rw-r--r--scilab/modules/special_functions/help/ja_JP/delip.xml75
-rw-r--r--scilab/modules/special_functions/help/pt_BR/delip.xml75
-rw-r--r--scilab/modules/special_functions/help/ru_RU/dawson.xml148
-rw-r--r--scilab/modules/special_functions/help/ru_RU/delip.xml81
-rw-r--r--scilab/modules/spreadsheet/src/c/csvRead.c51
-rw-r--r--scilab/modules/spreadsheet/tests/nonreg_tests/bug_16391.tst35
-rw-r--r--scilab/modules/statistics/help/en_US/6_sampling/CHAPTER1
-rw-r--r--scilab/modules/statistics/help/fr_FR/6_sampling/CHAPTER1
-rw-r--r--scilab/modules/statistics/help/ja_JP/6_sampling/CHAPTER1
-rw-r--r--scilab/modules/string/help/images/prettyprint_LaTeX_MathJax.pngbin91644 -> 113843 bytes
-rw-r--r--scilab/modules/string/includes/os_wtoi.h2
-rw-r--r--scilab/modules/string/src/cpp/os_wtoi.cpp33
-rw-r--r--scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/BrowseVar.java115
-rw-r--r--scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/filebrowser/FileNode.java70
-rw-r--r--scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/filebrowser/ScilabFileBrowserModel.java247
-rw-r--r--scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/filebrowser/ScilabTreeTableModelAdapter.java70
-rw-r--r--scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/filebrowser/SwingScilabTreeTable.java160
-rw-r--r--scilab/modules/webtools/help/en_US/toJSON.xml3
-rw-r--r--scilab/modules/webtools/sci_gateway/cpp/sci_http_delete.cpp2
-rw-r--r--scilab/modules/webtools/sci_gateway/cpp/sci_http_get.cpp4
-rw-r--r--scilab/modules/webtools/sci_gateway/cpp/sci_http_put_post.cpp2
-rw-r--r--scilab/modules/webtools/sci_gateway/cpp/sci_http_upload.cpp2
-rw-r--r--scilab/modules/webtools/sci_gateway/cpp/sci_toJSON.cpp4
-rw-r--r--scilab/modules/webtools/src/cpp/sciCurl.cpp18
-rw-r--r--scilab/modules/webtools/src/cpp/sciCurl.hxx1
-rw-r--r--scilab/modules/webtools/tests/nonreg_tests/bug_16408.tst24
-rw-r--r--scilab/modules/xcos/help/en_US/palettes/Signalrouting_pal/DEMUX.xml2
-rw-r--r--scilab/modules/xcos/help/en_US/palettes/Signalrouting_pal/MUX.xml2
-rw-r--r--scilab/modules/xml/help/en_US/xmlGetValues.xml2
-rw-r--r--scilab/modules/xml/help/ja_JP/xmlGetValues.xml2
356 files changed, 11956 insertions, 7741 deletions
diff --git a/scilab/CHANGES.md b/scilab/CHANGES.md
index 49f0d86..ea5e6e8 100644
--- a/scilab/CHANGES.md
+++ b/scilab/CHANGES.md
@@ -191,6 +191,10 @@ Feature changes and additions
191* `atomsGetInstalledPath` is no longer sensitive to the case or completeness of the modules names. Providing the modules versions is now optional. 191* `atomsGetInstalledPath` is no longer sensitive to the case or completeness of the modules names. Providing the modules versions is now optional.
192* `function` replaces `mc` as the new overloading code for functions in Scilab language. 192* `function` replaces `mc` as the new overloading code for functions in Scilab language.
193 193
1946.1.1
195* `gsort` is fully enabled for sparse vectors and 2D matrices, in all `g, r, c, lr, lc` methods. It was formerly limited to real or complex vectors and only to the `g` mode. All boolean, real or complex vector or 2D matrices can now be sorted with any method. Multi-level sorting is enabled for all types of sparse input.
196* `unique` is enabled for any 2D sparse arrays, in simple, 'c' and 'r' modes.
197
194Help pages: 198Help pages:
195----------- 199-----------
196 200
@@ -238,6 +242,7 @@ Obsolete functions or features
238* `hist3d` is renamed `bar3d`. The former `hist3d` function is declared obsolete and will be replaced by an actual 3D histogram function in Scilab 6.2. 242* `hist3d` is renamed `bar3d`. The former `hist3d` function is declared obsolete and will be replaced by an actual 3D histogram function in Scilab 6.2.
239* `scatter3` is obsolete. Please use `scatter3d` instead. 243* `scatter3` is obsolete. Please use `scatter3d` instead.
240* `saveafterncommands` is canceled. It will be removed from Scilab 6.1.x 244* `saveafterncommands` is canceled. It will be removed from Scilab 6.1.x
245* `xname` is obsolete. It will be removed from Scilab 6.2.x. Please use `gcf().figure_name` instead.
241 246
242Removed Functions 247Removed Functions
243----------------- 248-----------------
@@ -264,10 +269,44 @@ Known issues
264Bug Fixes 269Bug Fixes
265--------- 270---------
266 271
272### Bugs fixed in 6.2.0:
273
274
267### Bugs fixed in 6.1.1: 275### Bugs fixed in 6.1.1:
276
268* [#3188](https://bugzilla.scilab.org/3188): `part()` was slower than in Scilab 4.1.2. 277* [#3188](https://bugzilla.scilab.org/3188): `part()` was slower than in Scilab 4.1.2.
278* [#8059](https://bugzilla.scilab.org/8059): A local `.wgetrc` config file could make troubles in `atomsDownload`.
279* [#9909](https://bugzilla.scilab.org/9909): In the help browser, add a way to open the online version of the current page.
280* [#12889](https://bugzilla.scilab.org/12889): In the help browser, add a menu allowing to select the language of help pages, regardless of the language of the session.
281* [#14873](https://bugzilla.scilab.org/14873): `setfield` page: The output and the 6.0 history were documented only on the en_US version. The input was wrongly restricted to matrices, while any Scilab object is acceptable. The specific role of `setfield` for mlists was not really described nor illustrated. The example did not include any call to setfield.
282* [#15839](https://bugzilla.scilab.org/15839): `gsort`: the only sparse possible input were real or complex vectors, and only with the `g` method.
283* [#15842](https://bugzilla.scilab.org/15842): `unique` could not process 2D sparse matrices.
284* [#16106](https://bugzilla.scilab.org/16106): Xcos sciblk4 user-defined blocks did not handle opar and odstate/oz correctly.
285* [#16122](https://bugzilla.scilab.org/16122): concat polynomials with <> var did not raise an error.
286* [#16274](https://bugzilla.scilab.org/16274): assert_checkequal() did not considered equal matching Nan or void elements in (nested) containers.
287* [#16337](https://bugzilla.scilab.org/16337): The 3rd output of `[U,km,ku] = unique(..)` was not implemented.
269* [#16342](https://bugzilla.scilab.org/16342): `strcat()` was much slower in Scilab 6.0.2. 288* [#16342](https://bugzilla.scilab.org/16342): `strcat()` was much slower in Scilab 6.0.2.
289* [#16350](https://bugzilla.scilab.org/16350): in if/while conditions, the empty sparse boolean was considered as TRUE.
290* [#16358](https://bugzilla.scilab.org/16358): `isdef([],..)` yielded an error instead of returning [].
270* [#16365](https://bugzilla.scilab.org/16365): `median(m,"r")` and `median(m,"c")` yielded wrong results (6.1.0 regression) 291* [#16365](https://bugzilla.scilab.org/16365): `median(m,"r")` and `median(m,"c")` yielded wrong results (6.1.0 regression)
292* [#16366](https://bugzilla.scilab.org/16366): `plot([0 1], ":")` plotted a dash-dotted curve instead of a dotted one.
293* [#16369](https://bugzilla.scilab.org/16369): Right divisions / involving one or two sparse numerical matrices were no longer supported.
294* [#16370](https://bugzilla.scilab.org/16370): `msprintf()` did not handle LaTeX dollars anymore.
295* [#16374](https://bugzilla.scilab.org/16374): Any plot with datatips saved in Scilab 5.5 could not be loaded in Scilab 6.
296* [#16391](https://bugzilla.scilab.org/16391): `csvRead()` was crashing with CSV files containing empty lines.
297* [#16397](https://bugzilla.scilab.org/16397): display of long (real) column vectors was slow (regression).
298* [#16399](https://bugzilla.scilab.org/16399): `mtlb_zeros([])` was crashing Scilab.
299* [#16401](https://bugzilla.scilab.org/16401): global `external_object_java` class was crashing Scilab.
300* [#16403](https://bugzilla.scilab.org/16403): 1D extraction of matrix with implicit index had wrong dimensions.
301* [#16406](https://bugzilla.scilab.org/16406): `edit_curv` yielded an error when reading data.
302* [#16408](https://bugzilla.scilab.org/16408): toJSON(var, indent, filename) is the right call sequence. Documentation has been udpated.
303* [#16445](https://bugzilla.scilab.org/16445): `colorbar(..)` ignored how to guess `umin` and `umax` for a Champ object (with .colored="on").
304* [#16449](https://bugzilla.scilab.org/16449): Insertion of implicit vector in Cell was crahsing Scilab
305* [#16450](https://bugzilla.scilab.org/16450): Concatenating encoded integers with decimal or complex numbers was not possible.
306* [#16452](https://bugzilla.scilab.org/16452): `setdiff(sparse([1 3 0 2]), sparse([3 7]))` missed returning 0, and wrongly returned 3.
307* [#16454](https://bugzilla.scilab.org/16454): `gsort` yielded an error when sorting any sparse vector including some NaN.
308* [#16473](https://bugzilla.scilab.org/16473): Deleting rows in a sparse squared the matrix with padding zeros (Scilab 6 regression).
309
271 310
272### Bugs fixed in 6.1.0: 311### Bugs fixed in 6.1.0:
273* [#2694](https://bugzilla.scilab.org/2694): `bitget` did not accept positive integers of types int8, int16 or int32. 312* [#2694](https://bugzilla.scilab.org/2694): `bitget` did not accept positive integers of types int8, int16 or int32.
@@ -280,7 +319,7 @@ Bug Fixes
280* [#7724](https://bugzilla.scilab.org/7724): When a figure is created in .auto_resize="on" mode, its .axes_size sets its .figure_size accordingly, not the reverse. But this was not documented. 319* [#7724](https://bugzilla.scilab.org/7724): When a figure is created in .auto_resize="on" mode, its .axes_size sets its .figure_size accordingly, not the reverse. But this was not documented.
281* [#7732](https://bugzilla.scilab.org/7732): The `datafit` help page needed to be fixed and overhauled. 320* [#7732](https://bugzilla.scilab.org/7732): The `datafit` help page needed to be fixed and overhauled.
282* [#7765](https://bugzilla.scilab.org/7765): `champ1` is useless. `champ().colored` is available for a long time. 321* [#7765](https://bugzilla.scilab.org/7765): `champ1` is useless. `champ().colored` is available for a long time.
283* [#7777](https://bugzilla.scilab.org/7777): `ged` did not allow moving several objects. 322* [#7777](https://bugzilla.scilab.org/7777): `ged` did not allow moving several objects.
284* [#7948](https://bugzilla.scilab.org/7948): `gsort` could not perform multilevel sorting, and could not sort complex numbers completely. 323* [#7948](https://bugzilla.scilab.org/7948): `gsort` could not perform multilevel sorting, and could not sort complex numbers completely.
285* [#7967](https://bugzilla.scilab.org/7967): The tricky size `[ny,nx]` of `meshgrid(x,y)` results and usages with graphics was not enough documented. 324* [#7967](https://bugzilla.scilab.org/7967): The tricky size `[ny,nx]` of `meshgrid(x,y)` results and usages with graphics was not enough documented.
286* [#8301](https://bugzilla.scilab.org/8301): `definedfields` wrongly considered as defined void elements in lists, tlists and mlists. 325* [#8301](https://bugzilla.scilab.org/8301): `definedfields` wrongly considered as defined void elements in lists, tlists and mlists.
@@ -304,7 +343,7 @@ Bug Fixes
304* [#11852](https://bugzilla.scilab.org/11852): File browser didn't update after file creation or removal. 343* [#11852](https://bugzilla.scilab.org/11852): File browser didn't update after file creation or removal.
305* [#11363](https://bugzilla.scilab.org/11363): `show_window()` did not raise the current graphics window. 344* [#11363](https://bugzilla.scilab.org/11363): `show_window()` did not raise the current graphics window.
306* [#12013](https://bugzilla.scilab.org/12013): `bitset` did not work for numbers greater than 2^32-1. 345* [#12013](https://bugzilla.scilab.org/12013): `bitset` did not work for numbers greater than 2^32-1.
307* [#12302](https://bugzilla.scilab.org/12302): Blocks of legends could not be moved interactively. 346* [#12302](https://bugzilla.scilab.org/12302): Blocks of legends could not be moved interactively.
308* [#12428](https://bugzilla.scilab.org/12428): A part of an error message from `toprint` was not translated. 347* [#12428](https://bugzilla.scilab.org/12428): A part of an error message from `toprint` was not translated.
309* [#12520](https://bugzilla.scilab.org/12520): Variable browser did not display the size of the variables. 348* [#12520](https://bugzilla.scilab.org/12520): Variable browser did not display the size of the variables.
310* [#12534](https://bugzilla.scilab.org/12534): Variable browser did not display the size of the variables. 349* [#12534](https://bugzilla.scilab.org/12534): Variable browser did not display the size of the variables.
@@ -320,7 +359,7 @@ Bug Fixes
320* [#14501](https://bugzilla.scilab.org/14501): `strsubst` crashed on consecutive occurrences. 359* [#14501](https://bugzilla.scilab.org/14501): `strsubst` crashed on consecutive occurrences.
321* [#14557](https://bugzilla.scilab.org/14557): `csim` failed when the system has no state. 360* [#14557](https://bugzilla.scilab.org/14557): `csim` failed when the system has no state.
322* [#14498](https://bugzilla.scilab.org/14498): `size([],3)` returned 1 instead of 0. 361* [#14498](https://bugzilla.scilab.org/14498): `size([],3)` returned 1 instead of 0.
323* [#14487](https://bugzilla.scilab.org/14487): matrix indexing was not coherent with MATLAB. 362* [#14487](https://bugzilla.scilab.org/14487): matrix indexing was not coherent with MATLAB.
324* [#14502](https://bugzilla.scilab.org/14502): `Demo > GUI > Uicontrols 2` could not be exported to a file. 363* [#14502](https://bugzilla.scilab.org/14502): `Demo > GUI > Uicontrols 2` could not be exported to a file.
325* [#14585](https://bugzilla.scilab.org/14585): `closeEditvar()` had to be replaced with `editvar("close")`. 364* [#14585](https://bugzilla.scilab.org/14585): `closeEditvar()` had to be replaced with `editvar("close")`.
326* [#14604](https://bugzilla.scilab.org/14604): `emptystr` is 40x slower with 6.0.0 wrt 5.5.2 365* [#14604](https://bugzilla.scilab.org/14604): `emptystr` is 40x slower with 6.0.0 wrt 5.5.2
@@ -480,6 +519,7 @@ Bug Fixes
480* [#16197](https://bugzilla.scilab.org/16197): result of extraction was not decomplexified when applicable. 519* [#16197](https://bugzilla.scilab.org/16197): result of extraction was not decomplexified when applicable.
481* [#16199](https://bugzilla.scilab.org/16199): In the documentation, `zpk2tf` and `zpk2ss` examples yielded an error. 520* [#16199](https://bugzilla.scilab.org/16199): In the documentation, `zpk2tf` and `zpk2ss` examples yielded an error.
482* [#16200](https://bugzilla.scilab.org/16200): Concatenation of transposed cells crashed Scilab. 521* [#16200](https://bugzilla.scilab.org/16200): Concatenation of transposed cells crashed Scilab.
522* [#16204](https://bugzilla.scilab.org/16204): `for i=1:$, end` crashed Scilab.
483* [#16208](https://bugzilla.scilab.org/16208): Using 3D string matrix with old C-api gateways may crash Scilab. 523* [#16208](https://bugzilla.scilab.org/16208): Using 3D string matrix with old C-api gateways may crash Scilab.
484* [#16209](https://bugzilla.scilab.org/16209): `grand` causes a freeze after several consecutive calls when using default base generator. 524* [#16209](https://bugzilla.scilab.org/16209): `grand` causes a freeze after several consecutive calls when using default base generator.
485* [#16210](https://bugzilla.scilab.org/16210): The uicontrol.units = "normalized" property was not described. 525* [#16210](https://bugzilla.scilab.org/16210): The uicontrol.units = "normalized" property was not described.
@@ -517,3 +557,7 @@ Bug Fixes
517* [#16323](https://bugzilla.scilab.org/16323): `conj(sparse(x))` was complex when x is real. 557* [#16323](https://bugzilla.scilab.org/16323): `conj(sparse(x))` was complex when x is real.
518* [#16325](https://bugzilla.scilab.org/16325): `mgetl` could not read single line data which is greater than ~260,000 characters. 558* [#16325](https://bugzilla.scilab.org/16325): `mgetl` could not read single line data which is greater than ~260,000 characters.
519* [#16333](https://bugzilla.scilab.org/16333): `tree_show` crashed for an input Xcos block. 559* [#16333](https://bugzilla.scilab.org/16333): `tree_show` crashed for an input Xcos block.
560* [#16373](https://bugzilla.scilab.org/16373): Scilab Crashed or showing wrong output when running on Arm processor
561* [#16459](https://bugzilla.scilab.org/16459): The display of one column hypermatrix was wrong.
562* [#16463](https://bugzilla.scilab.org/16463): `matrix(sparse([]),[0 0])` yielded `[]` instead of `sparse([])`.
563* [#16483](https://bugzilla.scilab.org/16483): substraction of complex polynomial matrices was broken (Scilab 6 regression).
diff --git a/scilab/bin/scilab b/scilab/bin/scilab
index 475457d..9e83fef 100755
--- a/scilab/bin/scilab
+++ b/scilab/bin/scilab
@@ -1110,10 +1110,10 @@ do_help()
1110 exit 1110 exit
1111} 1111}
1112 1112
1113# under MacOS X LANG is not set when launching Scilab from its icon 1113# under MacOS X LANG is not set when launching Scilab from its icon
1114if test "$OS" = "Darwin"; then 1114if test "$OS" = "Darwin"; then
1115 if test -z "$LANG"; then 1115 if test -z "$LANG"; then
1116 export LANG=`osascript -e "return user locale of (get system info)"`.UTF-8 1116 export LANG=$(defaults read NSGlobalDomain AppleLocale).UTF-8
1117 fi 1117 fi
1118fi 1118fi
1119 1119
diff --git a/scilab/modules/ast/includes/system_env/configvariable.hxx b/scilab/modules/ast/includes/system_env/configvariable.hxx
index 81be2ed..0380faf 100644
--- a/scilab/modules/ast/includes/system_env/configvariable.hxx
+++ b/scilab/modules/ast/includes/system_env/configvariable.hxx
@@ -248,6 +248,7 @@ public :
248 */ 248 */
249 249
250private : 250private :
251 static int m_iUserMode;
251 static int m_iPromptMode; 252 static int m_iPromptMode;
252 static bool m_printInput; 253 static bool m_printInput;
253 static bool m_printOutput; 254 static bool m_printOutput;
@@ -255,6 +256,9 @@ private :
255 static bool m_printInteractive; 256 static bool m_printInteractive;
256 257
257public : 258public :
259 static void setUserMode(int _iPromptMode);
260 static int getUserMode(void);
261
258 static void setPromptMode(int _iPromptMode); 262 static void setPromptMode(int _iPromptMode);
259 static int getPromptMode(void); 263 static int getPromptMode(void);
260 264
@@ -530,7 +534,7 @@ public :
530 static void resetRecursionLevel(); 534 static void resetRecursionLevel();
531 static bool increaseRecursion(); 535 static bool increaseRecursion();
532 static void decreaseRecursion(); 536 static void decreaseRecursion();
533private: 537private:
534 static bool webMode; 538 static bool webMode;
535public: 539public:
536 static bool getWebMode(); 540 static bool getWebMode();
diff --git a/scilab/modules/ast/includes/types/sparse.hxx b/scilab/modules/ast/includes/types/sparse.hxx
index 7731b46..e662a83 100644
--- a/scilab/modules/ast/includes/types/sparse.hxx
+++ b/scilab/modules/ast/includes/types/sparse.hxx
@@ -599,7 +599,7 @@ struct EXTERN_AST SparseBool : GenericType
599 599
600 bool isTrue() 600 bool isTrue()
601 { 601 {
602 if (static_cast<int>(nbTrue()) == m_iSize) 602 if (m_iSize > 0 && static_cast<int>(nbTrue()) == m_iSize)
603 { 603 {
604 return true; 604 return true;
605 } 605 }
diff --git a/scilab/modules/ast/src/cpp/ast/run_AssignExp.hpp b/scilab/modules/ast/src/cpp/ast/run_AssignExp.hpp
index ae123c9..ec8249b 100644
--- a/scilab/modules/ast/src/cpp/ast/run_AssignExp.hpp
+++ b/scilab/modules/ast/src/cpp/ast/run_AssignExp.hpp
@@ -131,7 +131,7 @@ void RunVisitorT<T>::visitprivate(const AssignExp &e)
131 ostr << L" " << wstrName << L" = " << std::endl; 131 ostr << L" " << wstrName << L" = " << std::endl;
132 if (ConfigVariable::isPrintCompact() == false) 132 if (ConfigVariable::isPrintCompact() == false)
133 { 133 {
134 ostr << std::endl; 134 ostr << std::endl;
135 } 135 }
136 scilabWriteW(ostr.str().c_str()); 136 scilabWriteW(ostr.str().c_str());
137 std::wostringstream ostrName; 137 std::wostringstream ostrName;
@@ -191,6 +191,17 @@ void RunVisitorT<T>::visitprivate(const AssignExp &e)
191 throw ast::InternalError(os.str(), 999, e.getRightExp().getLocation()); 191 throw ast::InternalError(os.str(), 999, e.getRightExp().getLocation());
192 } 192 }
193 193
194 if (pITR->isImplicitList())
195 {
196 if (pITR->getAs<types::ImplicitList>()->isComputable())
197 {
198 types::InternalType *pTemp = pITR->getAs<types::ImplicitList>()->extractFullMatrix();
199 delete pITR;
200 setResult(NULL);
201 pITR = pTemp;
202 }
203 }
204
194 try 205 try
195 { 206 {
196 pOut = evaluateFields(pCell, fields, pITR); 207 pOut = evaluateFields(pCell, fields, pITR);
@@ -230,7 +241,7 @@ void RunVisitorT<T>::visitprivate(const AssignExp &e)
230 ostr << L" " << *getStructNameFromExp(pCell) << L" = " << std::endl; 241 ostr << L" " << *getStructNameFromExp(pCell) << L" = " << std::endl;
231 if (ConfigVariable::isPrintCompact() == false) 242 if (ConfigVariable::isPrintCompact() == false)
232 { 243 {
233 ostr << std::endl; 244 ostr << std::endl;
234 } 245 }
235 scilabWriteW(ostr.str().c_str()); 246 scilabWriteW(ostr.str().c_str());
236 247
@@ -403,7 +414,7 @@ void RunVisitorT<T>::visitprivate(const AssignExp &e)
403 ostr << L" " << *getStructNameFromExp(&pCall->getName()) << L" = " << std::endl; 414 ostr << L" " << *getStructNameFromExp(&pCall->getName()) << L" = " << std::endl;
404 if (ConfigVariable::isPrintCompact() == false) 415 if (ConfigVariable::isPrintCompact() == false)
405 { 416 {
406 ostr << std::endl; 417 ostr << std::endl;
407 } 418 }
408 scilabWriteW(ostr.str().c_str()); 419 scilabWriteW(ostr.str().c_str());
409 420
@@ -549,7 +560,7 @@ void RunVisitorT<T>::visitprivate(const AssignExp &e)
549 ostr << L" " << *pstName << L" = " << std::endl; 560 ostr << L" " << *pstName << L" = " << std::endl;
550 if (ConfigVariable::isPrintCompact() == false) 561 if (ConfigVariable::isPrintCompact() == false)
551 { 562 {
552 ostr << std::endl; 563 ostr << std::endl;
553 } 564 }
554 scilabWriteW(ostr.str().c_str()); 565 scilabWriteW(ostr.str().c_str());
555 566
diff --git a/scilab/modules/ast/src/cpp/ast/runvisitor.cpp b/scilab/modules/ast/src/cpp/ast/runvisitor.cpp
index 78113c0..8331130 100644
--- a/scilab/modules/ast/src/cpp/ast/runvisitor.cpp
+++ b/scilab/modules/ast/src/cpp/ast/runvisitor.cpp
@@ -662,6 +662,12 @@ void RunVisitorT<T>::visitprivate(const ForExp &e)
662 { 662 {
663 //get IL 663 //get IL
664 types::ImplicitList* pVar = pIT->getAs<types::ImplicitList>(); 664 types::ImplicitList* pVar = pIT->getAs<types::ImplicitList>();
665 if (pVar->isComputable() == false)
666 {
667 std::wostringstream os;
668 os << _W("Invalid index.\n");
669 throw ast::InternalError(os.str(), 999, e.getLocation());
670 }
665 //get IL initial Type 671 //get IL initial Type
666 types::InternalType * pIL = pVar->getInitalType(); 672 types::InternalType * pIL = pVar->getInitalType();
667 //std::cout << "for IL: " << pIL << std::endl; 673 //std::cout << "for IL: " << pIL << std::endl;
diff --git a/scilab/modules/ast/src/cpp/ast/visitor_common.cpp b/scilab/modules/ast/src/cpp/ast/visitor_common.cpp
index 3e3ead4..e5a924d 100644
--- a/scilab/modules/ast/src/cpp/ast/visitor_common.cpp
+++ b/scilab/modules/ast/src/cpp/ast/visitor_common.cpp
@@ -486,6 +486,11 @@ types::InternalType* AddElementToVariable(types::InternalType* _poDest, types::I
486 poResult->getAs<types::Double>()->append(iCurRow, iCurCol, _poSource); 486 poResult->getAs<types::Double>()->append(iCurRow, iCurCol, _poSource);
487 break; 487 break;
488 case types::InternalType::ScilabPolynom: 488 case types::InternalType::ScilabPolynom:
489 if (poResult->getAs<types::Polynom>()->getVariableName() != _poSource->getAs<types::Polynom>()->getVariableName())
490 {
491 // call overload
492 return NULL;
493 }
489 poResult->getAs<types::Polynom>()->append(iCurRow, iCurCol, _poSource); 494 poResult->getAs<types::Polynom>()->append(iCurRow, iCurCol, _poSource);
490 break; 495 break;
491 case types::InternalType::ScilabBool: 496 case types::InternalType::ScilabBool:
diff --git a/scilab/modules/ast/src/cpp/operations/types_subtraction.cpp b/scilab/modules/ast/src/cpp/operations/types_subtraction.cpp
index c7aad4c..f186031 100644
--- a/scilab/modules/ast/src/cpp/operations/types_subtraction.cpp
+++ b/scilab/modules/ast/src/cpp/operations/types_subtraction.cpp
@@ -1794,6 +1794,8 @@ template<> InternalType* sub_M_M<Polynom, Polynom, Polynom>(Polynom* _pL, Polyno
1794 1794
1795 double *p1R = _pL->get(i)->get(); 1795 double *p1R = _pL->get(i)->get();
1796 double *p2R = _pR->get(i)->get(); 1796 double *p2R = _pR->get(i)->get();
1797 double *p1I = _pL->get(i)->getImg();
1798 double *p2I = _pR->get(i)->getImg();
1797 double *pOutR = pOutCoef->get(); 1799 double *pOutR = pOutCoef->get();
1798 int iMin = std::min(pRank1[i], pRank2[i]); 1800 int iMin = std::min(pRank1[i], pRank2[i]);
1799 int iMax = std::max(pRank1[i], pRank2[i]); 1801 int iMax = std::max(pRank1[i], pRank2[i]);
@@ -1804,15 +1806,18 @@ template<> InternalType* sub_M_M<Polynom, Polynom, Polynom>(Polynom* _pL, Polyno
1804 } 1806 }
1805 1807
1806 double *pTemp = NULL; 1808 double *pTemp = NULL;
1809 double *pTempI = NULL;
1807 int iCoef = 1; 1810 int iCoef = 1;
1808 if (pRank1[i] > pRank2[i]) 1811 if (pRank1[i] > pRank2[i])
1809 { 1812 {
1810 pTemp = p1R; 1813 pTemp = p1R;
1814 pTempI = p1I;
1811 iCoef = 1; 1815 iCoef = 1;
1812 } 1816 }
1813 else 1817 else
1814 { 1818 {
1815 pTemp = p2R; 1819 pTemp = p2R;
1820 pTempI = p2I;
1816 iCoef = -1; 1821 iCoef = -1;
1817 } 1822 }
1818 1823
@@ -1823,8 +1828,6 @@ template<> InternalType* sub_M_M<Polynom, Polynom, Polynom>(Polynom* _pL, Polyno
1823 1828
1824 if (isOutComplex) 1829 if (isOutComplex)
1825 { 1830 {
1826 double *p1I = _pL->get(i)->getImg();
1827 double *p2I = _pR->get(i)->getImg();
1828 double *pOutI = pOutCoef->getImg(); 1831 double *pOutI = pOutCoef->getImg();
1829 1832
1830 for (int j = 0 ; j < iMin + 1 ; j++) 1833 for (int j = 0 ; j < iMin + 1 ; j++)
@@ -1832,9 +1835,12 @@ template<> InternalType* sub_M_M<Polynom, Polynom, Polynom>(Polynom* _pL, Polyno
1832 pOutI[j] = (p1I == NULL ? 0 : p1I[j]) - (p2I == NULL ? 0 : p2I[j]); 1835 pOutI[j] = (p1I == NULL ? 0 : p1I[j]) - (p2I == NULL ? 0 : p2I[j]);
1833 } 1836 }
1834 1837
1835 for (int j = iMin + 1 ; j < iMax + 1 ; j++) 1838 if (pTempI != NULL)
1836 { 1839 {
1837 pOutI[j] = pTemp[j] * iCoef; 1840 for (int j = iMin + 1 ; j < iMax + 1 ; j++)
1841 {
1842 pOutI[j] = pTempI[j] * iCoef;
1843 }
1838 } 1844 }
1839 } 1845 }
1840 } 1846 }
diff --git a/scilab/modules/ast/src/cpp/symbol/context.cpp b/scilab/modules/ast/src/cpp/symbol/context.cpp
index 6e33528..ad766f5 100644
--- a/scilab/modules/ast/src/cpp/symbol/context.cpp
+++ b/scilab/modules/ast/src/cpp/symbol/context.cpp
@@ -89,8 +89,8 @@ void Context::scope_begin()
89 89
90void Context::clearAll() 90void Context::clearAll()
91{ 91{
92 libraries.clearAll();
93 variables.clearAll(); 92 variables.clearAll();
93 libraries.clearAll();
94} 94}
95 95
96void Context::scope_end() 96void Context::scope_end()
@@ -217,13 +217,16 @@ types::InternalType* Context::get(const Symbol& _key, int _iLevel)
217 types::InternalType* pIT = NULL; 217 types::InternalType* pIT = NULL;
218 if (_iLevel == m_iLevel || _iLevel == SCOPE_ALL) 218 if (_iLevel == m_iLevel || _iLevel == SCOPE_ALL)
219 { 219 {
220 //look for in current VarList 220 if (!varStack.empty())
221 VarList::iterator it = varStack.top()->find(_key);
222 if (it != varStack.top()->end())
223 { 221 {
224 if (it->second->empty() == false) 222 //look for in current VarList
223 VarList::iterator it = varStack.top()->find(_key);
224 if (it != varStack.top()->end())
225 { 225 {
226 pIT = it->second->get(); 226 if (it->second->empty() == false)
227 {
228 pIT = it->second->get();
229 }
227 } 230 }
228 } 231 }
229 } 232 }
diff --git a/scilab/modules/ast/src/cpp/system_env/configvariable.cpp b/scilab/modules/ast/src/cpp/system_env/configvariable.cpp
index 89c746a..7845243 100644
--- a/scilab/modules/ast/src/cpp/system_env/configvariable.cpp
+++ b/scilab/modules/ast/src/cpp/system_env/configvariable.cpp
@@ -473,6 +473,20 @@ bool ConfigVariable::isSilentError(void)
473 return m_iSilentError; 473 return m_iSilentError;
474} 474}
475 475
476/* User Mode */
477
478int ConfigVariable::m_iUserMode = 0;
479void ConfigVariable::setUserMode(int _iPromptMode)
480{
481 m_iUserMode = _iPromptMode;
482 ConfigVariable::setPromptMode(_iPromptMode);
483}
484
485int ConfigVariable::getUserMode(void)
486{
487 return m_iUserMode;
488}
489
476/* Prompt Mode */ 490/* Prompt Mode */
477 491
478int ConfigVariable::m_iPromptMode = 0; 492int ConfigVariable::m_iPromptMode = 0;
diff --git a/scilab/modules/ast/src/cpp/types/arrayof.cpp b/scilab/modules/ast/src/cpp/types/arrayof.cpp
index 71989ee..d9350b7 100644
--- a/scilab/modules/ast/src/cpp/types/arrayof.cpp
+++ b/scilab/modules/ast/src/cpp/types/arrayof.cpp
@@ -1123,9 +1123,8 @@ GenericType* ArrayOf<T>::extract(typed_list* _pArgs)
1123 return NULL; 1123 return NULL;
1124 } 1124 }
1125 1125
1126 bool isRowVector = m_iRows == 1; 1126 bool isColVector = isForceColVector || (isVector() && m_iCols == 1);
1127 isRowVector = isRowVector && !isForceColVector; 1127 int dims[2] = {isColVector ? size : 1, isColVector ? 1 : size};
1128 int dims[2] = {isRowVector ? 1 : size, isRowVector ? size : 1};
1129 pOut = createEmpty(2, dims, isComplex()); 1128 pOut = createEmpty(2, dims, isComplex());
1130 double idx = start; 1129 double idx = start;
1131 1130
diff --git a/scilab/modules/ast/src/cpp/types/cell.cpp b/scilab/modules/ast/src/cpp/types/cell.cpp
index 1748bb6..eb94fd3 100644
--- a/scilab/modules/ast/src/cpp/types/cell.cpp
+++ b/scilab/modules/ast/src/cpp/types/cell.cpp
@@ -367,8 +367,7 @@ bool Cell::subMatrixToString(std::wostringstream& ostr, int* _piDims, int /*_iDi
367 else 367 else
368 { 368 {
369 //types non derived from ArrayOf. 369 //types non derived from ArrayOf.
370 int iSize = static_cast<int>(log10(static_cast<double>(pIT->getAs<GenericType>()->getRows())) + 1); 370 piSizeLen[j] = std::max(piSizeLen[j], 1);
371 piSizeLen[j] = std::max(piSizeLen[j], iSize);
372 } 371 }
373 } 372 }
374 else 373 else
diff --git a/scilab/modules/ast/src/cpp/types/double.cpp b/scilab/modules/ast/src/cpp/types/double.cpp
index 761f8c7..584ef51d 100644
--- a/scilab/modules/ast/src/cpp/types/double.cpp
+++ b/scilab/modules/ast/src/cpp/types/double.cpp
@@ -392,6 +392,33 @@ bool Double::subMatrixToString(std::wostringstream& ostr, int* _piDims, int /*_i
392 ostr << std::endl; 392 ostr << std::endl;
393 } 393 }
394 } 394 }
395 else if (isVector() && getCols() == 1 && isComplex() == false)
396 {
397 // real column vector
398
399 // compute the number of ligne to print in function of max line
400 int iLinesToPrint = getRows() - m_iRows1PrintState;
401 if ((iMaxLines == 0 && iLinesToPrint >= MAX_LINES) || (iMaxLines != 0 && iLinesToPrint >= iMaxLines))
402 {
403 // Number of lines to print exceeds the max lines allowed
404 iLinesToPrint = iMaxLines ? iMaxLines : MAX_LINES;
405 }
406
407 // print lines
408 for (int i = 0; i < iLinesToPrint; i++)
409 {
410 printDoubleValue(ostr, m_pRealData[m_iRows1PrintState + i]);
411 ostr << std::endl;
412 }
413
414 // Record what line we were at
415 m_iRows1PrintState += iLinesToPrint;
416 if(m_iRows1PrintState != getRows())
417 {
418 // ask before continue to print
419 return false;
420 }
421 }
395 else // matrix 422 else // matrix
396 { 423 {
397 std::wostringstream ostemp; 424 std::wostringstream ostemp;
@@ -525,6 +552,7 @@ bool Double::subMatrixToString(std::wostringstream& ostr, int* _piDims, int /*_i
525 //compute the row size for padding for the full matrix. 552 //compute the row size for padding for the full matrix.
526 for (int iCols1 = 0; iCols1 < getCols() ; iCols1++) 553 for (int iCols1 = 0; iCols1 < getCols() ; iCols1++)
527 { 554 {
555 DoubleFormat dfR, dfI;
528 for (int iRows1 = 0 ; iRows1 < getRows() ; iRows1++) 556 for (int iRows1 = 0 ; iRows1 < getRows() ; iRows1++)
529 { 557 {
530 int iTotalWidth = 0; 558 int iTotalWidth = 0;
@@ -532,13 +560,12 @@ bool Double::subMatrixToString(std::wostringstream& ostr, int* _piDims, int /*_i
532 _piDims[1] = iCols1; 560 _piDims[1] = iCols1;
533 int iPos = getIndex(_piDims); 561 int iPos = getIndex(_piDims);
534 562
535 DoubleFormat dfR, dfI;
536 getComplexFormat(m_pRealData[iPos], m_pImgData[iPos], &iTotalWidth, &dfR, &dfI); 563 getComplexFormat(m_pRealData[iPos], m_pImgData[iPos], &iTotalWidth, &dfR, &dfI);
537 // keep track of real and imaginary part width for further alignment 564 // keep track of real and imaginary part width for further alignment
538 piISize[iCols1] = std::max(piISize[iCols1], dfI.iWidth); 565 piISize[iCols1] = std::max(piISize[iCols1], dfI.iWidth);
539 piRSize[iCols1] = std::max(piRSize[iCols1], dfR.iWidth); 566 piRSize[iCols1] = std::max(piRSize[iCols1], dfR.iWidth);
540 piSize[iCols1] = std::max(piSize[iCols1], iTotalWidth);
541 } 567 }
568 piSize[iCols1] = piISize[iCols1] + piRSize[iCols1] + 2 * (dfR.bPrintBlank ? BLANK_SIZE : 0) + BLANK_SIZE + SIZE_SYMBOL_I;
542 } 569 }
543 570
544 for (int iCols1 = m_iCols1PrintState ; iCols1 < getCols() ; iCols1++) 571 for (int iCols1 = m_iCols1PrintState ; iCols1 < getCols() ; iCols1++)
diff --git a/scilab/modules/ast/src/cpp/types/sparse.cpp b/scilab/modules/ast/src/cpp/types/sparse.cpp
index 5e6cd64..fb2a5a6 100644
--- a/scilab/modules/ast/src/cpp/types/sparse.cpp
+++ b/scilab/modules/ast/src/cpp/types/sparse.cpp
@@ -1911,7 +1911,7 @@ GenericType* Sparse::remove(typed_list* _pArgs)
1911 } 1911 }
1912 else 1912 else
1913 { 1913 {
1914 pOut = new Sparse(piNewDims[0], piNewDims[0], isComplex()); 1914 pOut = new Sparse(piNewDims[0], piNewDims[1], isComplex());
1915 } 1915 }
1916 1916
1917 delete[] piNewDims; 1917 delete[] piNewDims;
@@ -2040,19 +2040,42 @@ GenericType* Sparse::extract(typed_list* _pArgs)
2040 { 2040 {
2041 if (piMaxDim[0] <= getSize()) 2041 if (piMaxDim[0] <= getSize())
2042 { 2042 {
2043 int iNewRows = 0; 2043 int iNewRows = 1;
2044 int iNewCols = 0; 2044 int iNewCols = 1;
2045 types::GenericType* pGT = (*_pArgs)[0]->getAs<GenericType>();
2045 2046
2046 if (getRows() == 1 && getCols() != 1 && (*_pArgs)[0]->isColon() == false) 2047 if ((*_pArgs)[0]->isColon())
2048 {
2049 iNewRows = piCountDim[0];
2050 }
2051 else if ( (!isScalar() && isVector()) && ((*_pArgs)[0]->isImplicitList() || pGT->isVector()) )
2052 {
2053 if (getRows() == 1)
2054 {
2055 iNewCols = piCountDim[0];
2056 }
2057 else
2058 {
2059 iNewRows = piCountDim[0];
2060 }
2061 }
2062 else if ((*_pArgs)[0]->isImplicitList())
2047 { 2063 {
2048 //special case for row vector
2049 iNewRows = 1;
2050 iNewCols = piCountDim[0]; 2064 iNewCols = piCountDim[0];
2051 } 2065 }
2052 else 2066 else
2053 { 2067 {
2054 iNewRows = piCountDim[0]; 2068 int *i_piDims = pGT->getDimsArray();
2055 iNewCols = 1; 2069 int i_iDims = pGT->getDims();
2070 if (i_iDims > 2)
2071 {
2072 iNewRows = piCountDim[0];
2073 }
2074 else
2075 {
2076 iNewRows = i_piDims[0];
2077 iNewCols = i_piDims[1];
2078 }
2056 } 2079 }
2057 2080
2058 double* pIdx = pArg[0]->getAs<Double>()->get(); 2081 double* pIdx = pArg[0]->getAs<Double>()->get();
@@ -3858,7 +3881,7 @@ GenericType* SparseBool::remove(typed_list* _pArgs)
3858 } 3881 }
3859 else 3882 else
3860 { 3883 {
3861 pOut = new SparseBool(piNewDims[0], piNewDims[0]); 3884 pOut = new SparseBool(piNewDims[0], piNewDims[1]);
3862 } 3885 }
3863 3886
3864 delete[] piNewDims; 3887 delete[] piNewDims;
@@ -4092,19 +4115,41 @@ GenericType* SparseBool::extract(typed_list* _pArgs)
4092 // Check that we stay inside the input size. 4115 // Check that we stay inside the input size.
4093 if (piMaxDim[0] <= getSize()) 4116 if (piMaxDim[0] <= getSize())
4094 { 4117 {
4095 int iNewRows = 0; 4118 int iNewRows = 1;
4096 int iNewCols = 0; 4119 int iNewCols = 1;
4097 4120
4098 if (getRows() == 1 && getCols() != 1 && (*_pArgs)[0]->isColon() == false) 4121 if ((*_pArgs)[0]->isColon())
4122 {
4123 iNewRows = piCountDim[0];
4124 }
4125 else if ( (!isScalar() && isVector()) && ((*_pArgs)[0]->isImplicitList() || (*_pArgs)[0]->getAs<GenericType>()->isVector()) )
4126 {
4127 if (getRows() == 1)
4128 {
4129 iNewCols = piCountDim[0];
4130 }
4131 else
4132 {
4133 iNewRows = piCountDim[0];
4134 }
4135 }
4136 else if ((*_pArgs)[0]->isImplicitList())
4099 { 4137 {
4100 //special case for row vector
4101 iNewRows = 1;
4102 iNewCols = piCountDim[0]; 4138 iNewCols = piCountDim[0];
4103 } 4139 }
4104 else 4140 else
4105 { 4141 {
4106 iNewRows = piCountDim[0]; 4142 int *i_piDims = (*_pArgs)[0]->getAs<GenericType>()->getDimsArray();
4107 iNewCols = 1; 4143 int i_iDims = (*_pArgs)[0]->getAs<GenericType>()->getDims();
4144 if (i_iDims > 2)
4145 {
4146 iNewRows = piCountDim[0];
4147 }
4148 else
4149 {
4150 iNewRows = i_piDims[0];
4151 iNewCols = i_piDims[1];
4152 }
4108 } 4153 }
4109 4154
4110 pOut = new SparseBool(iNewRows, iNewCols); 4155 pOut = new SparseBool(iNewRows, iNewCols);
@@ -4596,3 +4641,4 @@ void neg(const int r, const int c, const T * const in, Eigen::SparseMatrix<bool,
4596 out->finalize(); 4641 out->finalize();
4597} 4642}
4598} 4643}
4644
diff --git a/scilab/modules/ast/src/cpp/types/tostring_common.cpp b/scilab/modules/ast/src/cpp/types/tostring_common.cpp
index 0df8d0c..55c567d 100644
--- a/scilab/modules/ast/src/cpp/types/tostring_common.cpp
+++ b/scilab/modules/ast/src/cpp/types/tostring_common.cpp
@@ -106,7 +106,14 @@ void getDoubleFormat(double _dblVal, DoubleFormat * _pDF)
106 if (dblEnt == 0) 106 if (dblEnt == 0)
107 { 107 {
108 //[-1, 1] 108 //[-1, 1]
109 iNbDigit = (int)std::fabs(std::floor(std::log10(dblAbs))); 109 if (dblAbs == 0)
110 {
111 iNbDigit = -1;
112 }
113 else
114 {
115 iNbDigit = (int)std::fabs(std::floor(std::log10(dblAbs)));
116 }
110 117
111 if (iNbDigit >= (iPrecNeeded - 2) || _pDF->bExp) 118 if (iNbDigit >= (iPrecNeeded - 2) || _pDF->bExp)
112 { 119 {
@@ -180,8 +187,8 @@ void getComplexFormat(double _dblR, double _dblI, int *_piTotalWidth, DoubleForm
180{ 187{
181 getDoubleFormat(_dblR, _pDFR); 188 getDoubleFormat(_dblR, _pDFR);
182 getDoubleFormat(_dblI, _pDFI); 189 getDoubleFormat(_dblI, _pDFI);
183 190
184 *_piTotalWidth = _pDFR->iWidth + _pDFI->iWidth + 2*(_pDFR->bPrintBlank ? BLANK_SIZE : 0) + BLANK_SIZE + SIZE_SYMBOL_I; 191 *_piTotalWidth = _pDFR->iWidth + _pDFI->iWidth + 2 * (_pDFR->bPrintBlank ? BLANK_SIZE : 0) + BLANK_SIZE + SIZE_SYMBOL_I;
185} 192}
186 193
187void addDoubleValue(std::wostringstream * _postr, double _dblVal, DoubleFormat * _pDF) 194void addDoubleValue(std::wostringstream * _postr, double _dblVal, DoubleFormat * _pDF)
@@ -297,11 +304,11 @@ void addDoubleValue(std::wostringstream * _postr, double _dblVal, DoubleFormat *
297 // trim or append trailing zeros, if applicable 304 // trim or append trailing zeros, if applicable
298 if (_pDF->bPrintPoint == false) 305 if (_pDF->bPrintPoint == false)
299 { 306 {
300 iWidth = 1+str.length(); 307 iWidth = 1 + str.length();
301 } 308 }
302 else if (std::atof(str.data()) != fabs(_dblVal) && _pDF->bPrintTrailingZeros == true) 309 else if (std::atof(str.data()) != fabs(_dblVal) && _pDF->bPrintTrailingZeros == true)
303 { 310 {
304 str.append(std::max(0, (ConfigVariable::getFormatSize() - (int)str.length()))-1, '0'); 311 str.append(std::max(0, (ConfigVariable::getFormatSize() - (int)str.length())) - 1, '0');
305 } 312 }
306 313
307 wchar_t* pwstData = to_wide_string(str.data()); 314 wchar_t* pwstData = to_wide_string(str.data());
diff --git a/scilab/modules/ast/tests/nonreg_tests/bug_14245.tst b/scilab/modules/ast/tests/nonreg_tests/bug_14245.tst
index 276e793..acd20e8 100644
--- a/scilab/modules/ast/tests/nonreg_tests/bug_14245.tst
+++ b/scilab/modules/ast/tests/nonreg_tests/bug_14245.tst
@@ -5,6 +5,7 @@
5// This file is distributed under the same license as the Scilab package. 5// This file is distributed under the same license as the Scilab package.
6// ============================================================================= 6// =============================================================================
7// <-- CLI SHELL MODE --> 7// <-- CLI SHELL MODE -->
8// <-- NO CHECK REF -->
8// 9//
9// <-- Non-regression test for bug 14245 --> 10// <-- Non-regression test for bug 14245 -->
10// 11//
@@ -22,4 +23,4 @@ s=list();
22s(1)=struct("a",a,"b",b,"c",c); 23s(1)=struct("a",a,"b",b,"c",c);
23s(2)=2; 24s(2)=2;
24 25
25assert_checkequal(s(1).b(2)(1:3), [1 ; 3 ; 2]); 26assert_checkequal(s(1).b(2)(1:3), [1 3 2]);
diff --git a/scilab/modules/ast/tests/nonreg_tests/bug_14361.dia.ref b/scilab/modules/ast/tests/nonreg_tests/bug_14361.dia.ref
deleted file mode 100644
index ee84e75..0000000
--- a/scilab/modules/ast/tests/nonreg_tests/bug_14361.dia.ref
+++ /dev/null
@@ -1,356 +0,0 @@
1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2016 - Scilab Enterprises - Pierre-Aime Agnel
4//
5// This file is distributed under the same license as the Scilab package.
6// =============================================================================
7// <-- CLI SHELL MODE -->
8//
9// <-- Non-regression test for bug 14361 -->
10//
11// <-- Bugzilla URL -->
12// http://bugzilla.scilab.org/14361
13//
14// <-- Short Description -->
15// Parser did not manage comments after line continuation ... in matrix environnement
16// bug_14361
17colvect(1,1) = 1;
18colvect(2,1) = -2;
19linevect = colvect';
20a=[1; .../* a comment */
21-2];
22assert_checkequal(a, colvect);
23a=[1;.../* a comment */
24-2];
25assert_checkequal(a, colvect);
26a=[1; .../* a comment */
27 -2];
28assert_checkequal(a, colvect);
29a=[1;.../* a comment */
30 -2];
31assert_checkequal(a, colvect);
32a=[1; .../* a comment */
33- 2];
34assert_checkequal(a, colvect);
35a=[1;.../* a comment */
36- 2];
37assert_checkequal(a, colvect);
38a=[1 .../* a comment */
39-2];
40assert_checkequal(a, linevect);
41a=[1.../* a comment */
42-2];
43assert_checkequal(a, -1);
44a=[1 .../* a comment */
45 -2];
46assert_checkequal(a, linevect);
47a=[1.../* a comment */
48 -2];
49assert_checkequal(a, linevect);
50a=[1 .../* a comment */
51- 2];
52assert_checkequal(a, -1);
53a=[1.../* a comment */
54- 2];
55assert_checkequal(a, -1);
56// Operators within matrices
57// DOTTIMES
58a = [[2 3] .* ... /* a comment */
59-3];
60expected = [-6 -9];
61assert_checkequal(a, expected);
62//DOTRDIVIDE
63a = [[2 3] ./ ... /* a comment */
64-3];
65expected = [-2/3 -1];
66assert_checkequal(a, expected);
67//DOTLDIVIDE
68a = [[2 3] .\ ... /* a comment */
69-3];
70expected = [-3/2 -1];
71assert_checkequal(a, expected);
72//DOTPOWER
73a = [[2 3] .^ ... /* a comment */
74-3];
75expected = [(2^(-3)), (3^(-3))];
76assert_checkequal(a, expected);
77//MINUS
78a = [[2 3] - ... /* a comment */
79-3];
80expected = [(2-(-3)), (3-(-3))];
81assert_checkequal(a, expected);
82//PLUS
83a = [[2 3] + ... /* a comment */
84-3];
85expected = [(2+(-3)), (3+(-3))];
86assert_checkequal(a, expected);
87//TIMES
88a = [2 * ... /* a comment */
89 -3];
90expected = [(2*(-3))];
91assert_checkequal(a, expected);
92//RDIVIDE
93a = [2 / ... /* a comment */
94 -3];
95expected = [(2/(-3))];
96assert_checkequal(a, expected);
97//LDIVIDE
98a = [2 \ ... /* a comment */
99 -3];
100expected = [(2\(-3))];
101assert_checkequal(a, expected);
102//POWER
103a = [2 ^ ... /* a comment */
104 -3];
105expected = [(2^(-3))];
106assert_checkequal(a, expected);
107//KRONTIMES
108a = [[2 3] .*. ... /* a comment */
109 -3];
110expected = [([2, 3].*.(-3))];
111assert_checkequal(a, expected);
112//kronrdivide
113a = [[2 3] ./. ... /* a comment */
114 -3];
115expected = [([2, 3]./.(-3))];
116assert_checkequal(a, expected);
117//KRONLDIVIDE
118a = [[2 3] .\. ... /* a comment */
119 -3];
120expected = [([2, 3].\.(-3))];
121assert_checkequal(a, expected);
122//EQ
123a = [[2 3] == ... /* a comment */
124 -3];
125expected = [([2, 3]==(-3))];
126assert_checkequal(a, expected);
127//NE
128a = [[2 3] ~= ... /* a comment */
129 -3];
130expected = [([2, 3]~=(-3))];
131assert_checkequal(a, expected);
132//LT
133a = [[2 3] < ... /* a comment */
134 -3];
135expected = [([2, 3]<(-3))];
136assert_checkequal(a, expected);
137//GT
138a = [[2 3] > ... /* a comment */
139 -3];
140expected = [([2, 3]>(-3))];
141assert_checkequal(a, expected);
142//LE
143a = [[2 3] <= ... /* a comment */
144 -3];
145expected = [([2, 3]<=(-3))];
146assert_checkequal(a, expected);
147//GE
148a = [[2 3] >= ... /* a comment */
149 -3];
150expected = [([2, 3]>=(-3))];
151assert_checkequal(a, expected);
152// Comments on several lines
153a=[1; .../* a comment
154 on several lines */
155-2];
156assert_checkequal(a, colvect);
157a=[1;.../* a comment
158 on several lines */
159-2];
160assert_checkequal(a, colvect);
161a=[1; .../* a comment
162 on several lines */
163 -2];
164assert_checkequal(a, colvect);
165a=[1;.../* a comment
166 on several lines */
167 -2];
168assert_checkequal(a, colvect);
169a=[1; .../* a comment
170 on several lines */
171- 2];
172assert_checkequal(a, colvect);
173a=[1;.../* a comment
174 on several lines */
175- 2];
176assert_checkequal(a, colvect);
177a=[1 .../* a comment
178 on several lines */
179-2];
180assert_checkequal(a, linevect);
181a=[1.../* a comment
182 on several lines */
183-2];
184assert_checkequal(a, -1);
185a=[1 .../* a comment
186 on several lines */
187 -2];
188assert_checkequal(a, linevect);
189a=[1.../* a comment
190 on several lines */
191 -2];
192assert_checkequal(a, linevect);
193a=[1 .../* a comment
194 on several lines */
195- 2];
196assert_checkequal(a, -1);
197a=[1.../* a comment
198 on several lines */
199- 2];
200assert_checkequal(a, -1);
201// Operators within matrices
202// DOTTIMES
203a = [[2 3] .* ... /* a comment
204 on several lines */
205-3];
206expected = [-6 -9];
207assert_checkequal(a, expected);
208//DOTRDIVIDE
209a = [[2 3] ./ ... /* a comment
210 on several lines */
211-3];
212expected = [-2/3 -1];
213assert_checkequal(a, expected);
214//DOTLDIVIDE
215a = [[2 3] .\ ... /* a comment
216 on several lines */
217-3];
218expected = [-3/2 -1];
219assert_checkequal(a, expected);
220//DOTPOWER
221a = [[2 3] .^ ... /* a comment
222 on several lines */
223-3];
224expected = [(2^(-3)), (3^(-3))];
225assert_checkequal(a, expected);
226//MINUS
227a = [[2 3] - ... /* a comment
228 on several lines */
229-3];
230expected = [(2-(-3)), (3-(-3))];
231assert_checkequal(a, expected);
232//PLUS
233a = [[2 3] + ... /* a comment
234 on several lines */
235-3];
236expected = [(2+(-3)), (3+(-3))];
237assert_checkequal(a, expected);
238//TIMES
239a = [2 * ... /* a comment
240 on several lines */
241 -3];
242expected = [(2*(-3))];
243assert_checkequal(a, expected);
244//RDIVIDE
245a = [2 / ... /* a comment
246 on several lines */
247 -3];
248expected = [(2/(-3))];
249assert_checkequal(a, expected);
250//LDIVIDE
251a = [2 \ ... /* a comment
252 on several lines */
253 -3];
254expected = [(2\(-3))];
255assert_checkequal(a, expected);
256//POWER
257a = [2 ^ ... /* a comment
258 on several lines */
259 -3];
260expected = [(2^(-3))];
261assert_checkequal(a, expected);
262//KRONTIMES
263a = [[2 3] .*. ... /* a comment
264 on several lines */
265 -3];
266expected = [([2, 3].*.(-3))];
267assert_checkequal(a, expected);
268//KRONRDIVIDE
269a = [[2 3] ./. ... /* a comment
270 on several lines */
271 -3];
272expected = [([2, 3]./.(-3))];
273assert_checkequal(a, expected);
274//KRONLDIVIDE
275a = [[2 3] .\. ... /* a comment
276 on several lines */
277 -3];
278expected = [([2, 3].\.(-3))];
279assert_checkequal(a, expected);
280//EQ
281a = [[2 3] == ... /* a comment
282 on several lines */
283 -3];
284expected = [([2, 3]==(-3))];
285assert_checkequal(a, expected);
286//NE
287a = [[2 3] ~= ... /* a comment
288 on several lines */
289 -3];
290expected = [([2, 3]~=(-3))];
291assert_checkequal(a, expected);
292//LT
293a = [[2 3] < ... /* a comment
294 on several lines */
295 -3];
296expected = [([2, 3]<(-3))];
297assert_checkequal(a, expected);
298//GT
299a = [[2 3] > ... /* a comment
300 on several lines */
301 -3];
302expected = [([2, 3]>(-3))];
303assert_checkequal(a, expected);
304//LE
305a = [[2 3] <= ... /* a comment
306 on several lines */
307 -3];
308expected = [([2, 3]<=(-3))];
309assert_checkequal(a, expected);
310//GE
311a = [[2 3] >= ... /* a comment
312 on several lines */
313 -3];
314expected = [([2, 3]>=(-3))];
315assert_checkequal(a, expected);
316// Special behaviour of ... with + and -
317a = [1 +...
3182]
319 a =
320 3.
321expected = 3;
322assert_checkequal(a, expected);
323a = [1 +...
324 2]
325 a =
326 3.
327expected = 3;
328assert_checkequal(a, expected);
329a = [1 +...
330 +2]
331 a =
332 3.
333expected = 3;
334assert_checkequal(a, expected);
335a = [1 -...
3362]
337 a =
338 -1.
339expected = -1;
340assert_checkequal(a, expected);
341a = [1 -...
342 2]
343 a =
344 -1.
345expected = -1;
346assert_checkequal(a, expected);
347a = [1 -...
348 -2]
349 a =
350 3.
351expected = 3;
352assert_checkequal(a, expected);
353// Case with multiline comment
354str_cmd = ["a = [1 -... /* the start of a";
355 "multiline comment */ 2 3]"]; // this currently generates an error
356assert_checktrue(execstr(str_cmd, "errcatch") <> 0);
diff --git a/scilab/modules/ast/tests/nonreg_tests/bug_14361.tst b/scilab/modules/ast/tests/nonreg_tests/bug_14361.tst
deleted file mode 100644
index 44c47c3..0000000
--- a/scilab/modules/ast/tests/nonreg_tests/bug_14361.tst
+++ /dev/null
@@ -1,395 +0,0 @@
1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2016 - Scilab Enterprises - Pierre-Aime Agnel
4//
5// This file is distributed under the same license as the Scilab package.
6// =============================================================================
7// <-- CLI SHELL MODE -->
8//
9// <-- Non-regression test for bug 14361 -->
10//
11// <-- Bugzilla URL -->
12// http://bugzilla.scilab.org/14361
13//
14// <-- Short Description -->
15// Parser did not manage comments after line continuation ... in matrix environnement
16
17// bug_14361
18colvect(1,1) = 1;
19colvect(2,1) = -2;
20linevect = colvect';
21
22a=[1; .../* a comment */
23-2];
24assert_checkequal(a, colvect);
25a=[1;.../* a comment */
26-2];
27assert_checkequal(a, colvect);
28a=[1; .../* a comment */
29 -2];
30assert_checkequal(a, colvect);
31a=[1;.../* a comment */
32 -2];
33assert_checkequal(a, colvect);
34a=[1; .../* a comment */
35- 2];
36assert_checkequal(a, colvect);
37a=[1;.../* a comment */
38- 2];
39assert_checkequal(a, colvect);
40
41a=[1 .../* a comment */
42-2];
43assert_checkequal(a, linevect);
44a=[1.../* a comment */
45-2];
46assert_checkequal(a, -1);
47a=[1 .../* a comment */
48 -2];
49assert_checkequal(a, linevect);
50a=[1.../* a comment */
51 -2];
52assert_checkequal(a, linevect);
53a=[1 .../* a comment */
54- 2];
55assert_checkequal(a, -1);
56a=[1.../* a comment */
57- 2];
58assert_checkequal(a, -1);
59
60// Operators within matrices
61// DOTTIMES
62a = [[2 3] .* ... /* a comment */
63-3];
64expected = [-6 -9];
65assert_checkequal(a, expected);
66
67//DOTRDIVIDE
68
69a = [[2 3] ./ ... /* a comment */
70-3];
71expected = [-2/3 -1];
72assert_checkequal(a, expected);
73
74//DOTLDIVIDE
75a = [[2 3] .\ ... /* a comment */
76-3];
77expected = [-3/2 -1];
78assert_checkequal(a, expected);
79
80//DOTPOWER
81a = [[2 3] .^ ... /* a comment */
82-3];
83expected = [(2^(-3)), (3^(-3))];
84assert_checkequal(a, expected);
85
86//MINUS
87a = [[2 3] - ... /* a comment */
88-3];
89expected = [(2-(-3)), (3-(-3))];
90assert_checkequal(a, expected);
91
92//PLUS
93a = [[2 3] + ... /* a comment */
94-3];
95expected = [(2+(-3)), (3+(-3))];
96assert_checkequal(a, expected);
97
98//TIMES
99a = [2 * ... /* a comment */
100 -3];
101expected = [(2*(-3))];
102assert_checkequal(a, expected);
103
104//RDIVIDE
105a = [2 / ... /* a comment */
106 -3];
107expected = [(2/(-3))];
108assert_checkequal(a, expected);
109
110//LDIVIDE
111a = [2 \ ... /* a comment */
112 -3];
113expected = [(2\(-3))];
114assert_checkequal(a, expected);
115
116//POWER
117a = [2 ^ ... /* a comment */
118 -3];
119expected = [(2^(-3))];
120assert_checkequal(a, expected);
121
122//KRONTIMES
123a = [[2 3] .*. ... /* a comment */
124 -3];
125expected = [([2, 3].*.(-3))];
126assert_checkequal(a, expected);
127
128//kronrdivide
129a = [[2 3] ./. ... /* a comment */
130 -3];
131expected = [([2, 3]./.(-3))];
132assert_checkequal(a, expected);
133
134//KRONLDIVIDE
135a = [[2 3] .\. ... /* a comment */
136 -3];
137expected = [([2, 3].\.(-3))];
138assert_checkequal(a, expected);
139
140//EQ
141a = [[2 3] == ... /* a comment */
142 -3];
143expected = [([2, 3]==(-3))];
144assert_checkequal(a, expected);
145
146//NE
147a = [[2 3] ~= ... /* a comment */
148 -3];
149expected = [([2, 3]~=(-3))];
150assert_checkequal(a, expected);
151
152//LT
153a = [[2 3] < ... /* a comment */
154 -3];
155expected = [([2, 3]<(-3))];
156assert_checkequal(a, expected);
157
158//GT
159a = [[2 3] > ... /* a comment */
160 -3];
161expected = [([2, 3]>(-3))];
162assert_checkequal(a, expected);
163
164//LE
165a = [[2 3] <= ... /* a comment */
166 -3];
167expected = [([2, 3]<=(-3))];
168assert_checkequal(a, expected);
169
170//GE
171a = [[2 3] >= ... /* a comment */
172 -3];
173expected = [([2, 3]>=(-3))];
174assert_checkequal(a, expected);
175
176// Comments on several lines
177a=[1; .../* a comment
178 on several lines */
179-2];
180assert_checkequal(a, colvect);
181a=[1;.../* a comment
182 on several lines */
183-2];
184assert_checkequal(a, colvect);
185a=[1; .../* a comment
186 on several lines */
187 -2];
188assert_checkequal(a, colvect);
189a=[1;.../* a comment
190 on several lines */
191 -2];
192assert_checkequal(a, colvect);
193a=[1; .../* a comment
194 on several lines */
195- 2];
196assert_checkequal(a, colvect);
197a=[1;.../* a comment
198 on several lines */
199- 2];
200assert_checkequal(a, colvect);
201
202a=[1 .../* a comment
203 on several lines */
204-2];
205assert_checkequal(a, linevect);
206a=[1.../* a comment
207 on several lines */
208-2];
209assert_checkequal(a, -1);
210a=[1 .../* a comment
211 on several lines */
212 -2];
213assert_checkequal(a, linevect);
214a=[1.../* a comment
215 on several lines */
216 -2];
217assert_checkequal(a, linevect);
218a=[1 .../* a comment
219 on several lines */
220- 2];
221assert_checkequal(a, -1);
222a=[1.../* a comment
223 on several lines */
224- 2];
225assert_checkequal(a, -1);
226
227// Operators within matrices
228// DOTTIMES
229a = [[2 3] .* ... /* a comment
230 on several lines */
231-3];
232expected = [-6 -9];
233assert_checkequal(a, expected);
234
235//DOTRDIVIDE
236a = [[2 3] ./ ... /* a comment
237 on several lines */
238-3];
239expected = [-2/3 -1];
240assert_checkequal(a, expected);
241
242//DOTLDIVIDE
243a = [[2 3] .\ ... /* a comment
244 on several lines */
245-3];
246expected = [-3/2 -1];
247assert_checkequal(a, expected);
248
249//DOTPOWER
250a = [[2 3] .^ ... /* a comment
251 on several lines */
252-3];
253expected = [(2^(-3)), (3^(-3))];
254assert_checkequal(a, expected);
255
256//MINUS
257a = [[2 3] - ... /* a comment
258 on several lines */
259-3];
260expected = [(2-(-3)), (3-(-3))];
261assert_checkequal(a, expected);
262
263//PLUS
264a = [[2 3] + ... /* a comment
265 on several lines */
266-3];
267expected = [(2+(-3)), (3+(-3))];
268assert_checkequal(a, expected);
269
270//TIMES
271a = [2 * ... /* a comment
272 on several lines */
273 -3];
274expected = [(2*(-3))];
275assert_checkequal(a, expected);
276
277//RDIVIDE
278a = [2 / ... /* a comment
279 on several lines */
280 -3];
281expected = [(2/(-3))];
282assert_checkequal(a, expected);
283
284//LDIVIDE
285a = [2 \ ... /* a comment
286 on several lines */
287 -3];
288expected = [(2\(-3))];
289assert_checkequal(a, expected);
290
291//POWER
292a = [2 ^ ... /* a comment
293 on several lines */
294 -3];
295expected = [(2^(-3))];
296assert_checkequal(a, expected);
297
298//KRONTIMES
299a = [[2 3] .*. ... /* a comment
300 on several lines */
301 -3];
302expected = [([2, 3].*.(-3))];
303assert_checkequal(a, expected);
304
305//KRONRDIVIDE
306a = [[2 3] ./. ... /* a comment
307 on several lines */
308 -3];
309expected = [([2, 3]./.(-3))];
310assert_checkequal(a, expected);
311
312//KRONLDIVIDE
313a = [[2 3] .\. ... /* a comment
314 on several lines */
315 -3];
316expected = [([2, 3].\.(-3))];
317assert_checkequal(a, expected);
318
319//EQ
320a = [[2 3] == ... /* a comment
321 on several lines */
322 -3];
323expected = [([2, 3]==(-3))];
324assert_checkequal(a, expected);
325
326//NE
327a = [[2 3] ~= ... /* a comment
328 on several lines */
329 -3];
330expected = [([2, 3]~=(-3))];
331assert_checkequal(a, expected);
332
333//LT
334a = [[2 3] < ... /* a comment
335 on several lines */
336 -3];
337expected = [([2, 3]<(-3))];
338assert_checkequal(a, expected);
339
340//GT
341a = [[2 3] > ... /* a comment
342 on several lines */
343 -3];
344expected = [([2, 3]>(-3))];
345assert_checkequal(a, expected);
346
347//LE
348a = [[2 3] <= ... /* a comment
349 on several lines */
350 -3];
351expected = [([2, 3]<=(-3))];
352assert_checkequal(a, expected);
353
354//GE
355a = [[2 3] >= ... /* a comment
356 on several lines */
357 -3];
358expected = [([2, 3]>=(-3))];
359assert_checkequal(a, expected);
360
361// Special behaviour of ... with + and -
362a = [1 +...
3632]
364expected = 3;
365assert_checkequal(a, expected);
366
367a = [1 +...
368 2]
369expected = 3;
370assert_checkequal(a, expected);
371
372a = [1 +...
373 +2]
374expected = 3;
375assert_checkequal(a, expected);
376
377a = [1 -...
3782]
379expected = -1;
380assert_checkequal(a, expected);
381
382a = [1 -...
383 2]
384expected = -1;
385assert_checkequal(a, expected);
386
387a = [1 -...
388 -2]
389expected = 3;
390assert_checkequal(a, expected);
391
392// Case with multiline comment
393str_cmd = ["a = [1 -... /* the start of a";
394 "multiline comment */ 2 3]"]; // this currently generates an error
395assert_checktrue(execstr(str_cmd, "errcatch") <> 0);
diff --git a/scilab/modules/ast/tests/nonreg_tests/bug_14487.tst b/scilab/modules/ast/tests/nonreg_tests/bug_14487.tst
index 71395bc..a1a11f6 100644
--- a/scilab/modules/ast/tests/nonreg_tests/bug_14487.tst
+++ b/scilab/modules/ast/tests/nonreg_tests/bug_14487.tst
@@ -16,6 +16,8 @@
16// <-- Short Description --> 16// <-- Short Description -->
17// Matrix indexing is not coherent with MATLAB convention 17// Matrix indexing is not coherent with MATLAB convention
18 18
19//full
20
19x=rand(); // scalar 21x=rand(); // scalar
20i1=ones(1,4); 22i1=ones(1,4);
21i2=ones(2,4); 23i2=ones(2,4);
@@ -60,3 +62,86 @@ assert_checkequal(size(x(i1)), [1 4]);
60assert_checkequal(size(x(i1')), [4 1]); 62assert_checkequal(size(x(i1')), [4 1]);
61assert_checkequal(size(x(i2)), [2 4]); 63assert_checkequal(size(x(i2)), [2 4]);
62assert_checkequal(size(x(i3)), [2 2 2]); 64assert_checkequal(size(x(i3)), [2 2 2]);
65
66//sparse
67
68x=sparse(rand());
69i1=ones(1,4);
70i2=ones(2,4);
71i3=ones(2,2,2);
72assert_checkequal(size(x(i1)), [1 4]);
73assert_checkequal(size(x(i1')), [4 1]);
74assert_checkequal(size(x(i2)), [2 4]);
75assert_checkequal(size(x(i3)), [8 1]);
76
77x=sparse(rand(1,4)); // row vector
78i1=ones(1,4);
79i2=ones(2,4);
80i3=ones(2,2,2);
81assert_checkequal(size(x(i1)), [1 4]);
82assert_checkequal(size(x(i1')), [1 4]);
83assert_checkequal(size(x(i2)), [2 4]);
84assert_checkequal(size(x(i3)), [8 1]);
85
86x=sparse(rand(4,1)); // column vector
87i1=ones(1,4);
88i2=ones(2,4);
89i3=ones(2,2,2);
90assert_checkequal(size(x(i1)), [4 1]);
91assert_checkequal(size(x(i1')), [4 1]);
92assert_checkequal(size(x(i2)), [2 4]);
93assert_checkequal(size(x(i3)), [8 1]);
94
95x=sparse(rand(3,3)); // matrix
96i1=ones(1,4);
97i2=ones(2,4);
98i3=ones(2,2,2);
99assert_checkequal(size(x(i1)), [1 4]);
100assert_checkequal(size(x(i1')), [4 1]);
101assert_checkequal(size(x(i2)), [2 4]);
102assert_checkequal(size(x(i3)), [8 1]);
103
104
105//sparse boolean
106
107x=sparse(rand()>0.5);
108i1=ones(1,4);
109i2=ones(2,4);
110i3=ones(2,2,2);
111assert_checkequal(size(x(i1)), [1 4]);
112assert_checkequal(size(x(i1')), [4 1]);
113assert_checkequal(size(x(i2)), [2 4]);
114assert_checkequal(size(x(i3)), [8 1]);
115
116x=sparse(rand(1,4)>0.5); // row vector
117i1=ones(1,4);
118i2=ones(2,4);
119i3=ones(2,2,2);
120assert_checkequal(size(x(i1)), [1 4]);
121assert_checkequal(size(x(i1')), [1 4]);
122assert_checkequal(size(x(i2)), [2 4]);
123assert_checkequal(size(x(i3)), [8 1]);
124
125x=sparse(rand(4,1)>0.5); // column vector
126i1=ones(1,4);
127i2=ones(2,4);
128i3=ones(2,2,2);
129assert_checkequal(size(x(i1)), [4 1]);
130assert_checkequal(size(x(i1')), [4 1]);
131assert_checkequal(size(x(i2)), [2 4]);
132assert_checkequal(size(x(i3)), [8 1]);
133
134x=sparse(rand(3,3)>0.5); // matrix
135i1=ones(1,4);
136i2=ones(2,4);
137i3=ones(2,2,2);
138assert_checkequal(size(x(i1)), [1 4]);
139assert_checkequal(size(x(i1')), [4 1]);
140assert_checkequal(size(x(i2)), [2 4]);
141assert_checkequal(size(x(i3)), [8 1]);
142
143
144
145
146
147
diff --git a/scilab/modules/ast/tests/nonreg_tests/bug_15781.dia.ref b/scilab/modules/ast/tests/nonreg_tests/bug_15781.dia.ref
index 938576f..73895bc 100644
--- a/scilab/modules/ast/tests/nonreg_tests/bug_15781.dia.ref
+++ b/scilab/modules/ast/tests/nonreg_tests/bug_15781.dia.ref
@@ -43,10 +43,10 @@ end
43 0. + 0.i 0.7539023 + 0.6569866i Nan + 0.i 43 0. + 0.i 0.7539023 + 0.6569866i Nan + 0.i
44 0. + 0.i 0.1367372 + 0.9906074i -0.7596879 + 0.6502878i 44 0. + 0.i 0.1367372 + 0.9906074i -0.7596879 + 0.6502878i
45 column 4 45 column 4
46 0.9074468 + 0.420167i 46 0.9074468 + 0.420167i
47 -0.1455 + 0.9893582i 47 -0.1455 + 0.9893582i
48 0.843854 - 0.5365729i 48 0.843854 - 0.5365729i
49 Inf + 0.i 49 Inf + 0.i
50 column 1 to 3 50 column 1 to 3
51 0. + 0.i -0.4161468 + 0.9092974i -0.9899925 + 0.14112i 51 0. + 0.i -0.4161468 + 0.9092974i -0.9899925 + 0.14112i
52 column 4 52 column 4
@@ -56,7 +56,10 @@ end
56 " " 56 " "
57 0. + 0.i 0.7539023 + 0.6569866i Nan + 0.i 0.843854 - 0.5365729i 57 0. + 0.i 0.7539023 + 0.6569866i Nan + 0.i 0.843854 - 0.5365729i
58 " " 58 " "
59 0. + 0.i 0.1367372 + 0.9906074i -0.7596879 + 0.6502878i Inf + 0.i 59 column 1 to 3
60 0. + 0.i 0.1367372 + 0.9906074i -0.7596879 + 0.6502878i
61 column 4
62 Inf + 0.i
60 " " 63 " "
61 0. 64 0.
62 0. 65 0.
@@ -73,10 +76,10 @@ end
73 Nan + 0.i 76 Nan + 0.i
74 -0.7596879 + 0.6502878i 77 -0.7596879 + 0.6502878i
75 " " 78 " "
76 0.9074468 + 0.420167i 79 0.9074468 + 0.420167i
77 -0.1455 + 0.9893582i 80 -0.1455 + 0.9893582i
78 0.843854 - 0.5365729i 81 0.843854 - 0.5365729i
79 Inf + 0.i 82 Inf + 0.i
80 " " 83 " "
81 0. + 0.i 0. + 0.i 0. + 0.i 0. + 0.i 84 0. + 0.i 0. + 0.i 0. + 0.i 0. + 0.i
82 0. + 0.i 0. + 0.i 0. + 0.i 0. + 0.i 85 0. + 0.i 0. + 0.i 0. + 0.i 0. + 0.i
@@ -90,38 +93,38 @@ end
90 -0.5493061 - 1.5707963i 93 -0.5493061 - 1.5707963i
91 0. - 1.5707963i 94 0. - 1.5707963i
92 0.5493061 - 1.5707963i 95 0.5493061 - 1.5707963i
93 Inf + Nani 96 Nan + Nani
94 0.804719 + 3.1415927i 97 0.804719 + 3.1415927i
95 0.5493061 + 3.1415927i 98 0.5493061 + 3.1415927i
96 column 1 to 3 99 column 1 to 2
97 0.000D+00 + 0.000D+00i -4.161D-01 + 9.093D-01i -9.900D-01 + 1.411D-01i 100 0.000D+00 + 0.000D+00i -4.161D-01 + 9.093D-01i
98 0.000D+00 + 0.000D+00i 1.000D+00 + 1.000D+00i -8.391D-01 - 5.440D-01i 101 0.000D+00 + 0.000D+00i 1.000D+00 + 1.000D+00i
99 0.000D+00 + 0.000D+00i 7.539D-01 + 6.570D-01i Nan + 0.000D+00i 102 0.000D+00 + 0.000D+00i 7.539D-01 + 6.570D-01i
100 0.000D+00 + 0.000D+00i 1.367D-01 + 9.906D-01i -7.597D-01 + 6.503D-01i 103 0.000D+00 + 0.000D+00i 1.367D-01 + 9.906D-01i
101 column 4 104 column 3 to 4
102 9.074D-01 + 4.202D-01i 105 -9.900D-01 + 1.411D-01i 9.074D-01 + 4.202D-01i
103 -1.455D-01 + 9.894D-01i 106 -8.391D-01 - 5.440D-01i -1.455D-01 + 9.894D-01i
104 8.439D-01 - 5.366D-01i 107 Nan + 0.000D+00i 8.439D-01 - 5.366D-01i
105 Inf + 0.000D+00i 108 -7.597D-01 + 6.503D-01i Inf + 0.000D+00i
106 column 1 to 3 109 column 1 to 2
107 0.000D+00 + 0.000D+00i -4.161D-01 + 9.093D-01i -9.900D-01 + 1.411D-01i 110 0.000D+00 + 0.000D+00i -4.161D-01 + 9.093D-01i
108 column 4 111 column 3 to 4
109 9.074D-01 + 4.202D-01i 112 -9.900D-01 + 1.411D-01i 9.074D-01 + 4.202D-01i
110 " " 113 " "
111 column 1 to 3 114 column 1 to 2
112 0.000D+00 + 0.000D+00i 1.000D+00 + 1.000D+00i -8.391D-01 - 5.440D-01i 115 0.000D+00 + 0.000D+00i 1.000D+00 + 1.000D+00i
113 column 4 116 column 3 to 4
114 -1.455D-01 + 9.894D-01i 117 -8.391D-01 - 5.440D-01i -1.455D-01 + 9.894D-01i
115 " " 118 " "
116 column 1 to 3 119 column 1 to 3
117 0.000D+00 + 0.000D+00i 7.539D-01 + 6.570D-01i Nan + 0.000D+00i 120 0.000D+00 + 0.000D+00i 7.539D-01 + 6.570D-01i Nan + 0.000D+00i
118 column 4 121 column 4
119 8.439D-01 - 5.366D-01i 122 8.439D-01 - 5.366D-01i
120 " " 123 " "
121 column 1 to 3 124 column 1 to 2
122 0.000D+00 + 0.000D+00i 1.367D-01 + 9.906D-01i -7.597D-01 + 6.503D-01i 125 0.000D+00 + 0.000D+00i 1.367D-01 + 9.906D-01i
123 column 4 126 column 3 to 4
124 Inf + 0.000D+00i 127 -7.597D-01 + 6.503D-01i Inf + 0.000D+00i
125 " " 128 " "
126 0.000D+00 129 0.000D+00
127 0.000D+00 130 0.000D+00
@@ -143,16 +146,16 @@ end
143 8.439D-01 - 5.366D-01i 146 8.439D-01 - 5.366D-01i
144 Inf + 0.000D+00i 147 Inf + 0.000D+00i
145 " " 148 " "
146 column 1 to 3 149 column 1 to 2
147 0.000D+00 + 0.000D+00i 0.000D+00 + 0.000D+00i 0.000D+00 + 0.000D+00i 150 0.000D+00 + 0.000D+00i 0.000D+00 + 0.000D+00i
148 0.000D+00 + 0.000D+00i 0.000D+00 + 0.000D+00i 0.000D+00 + 0.000D+00i 151 0.000D+00 + 0.000D+00i 0.000D+00 + 0.000D+00i
149 0.000D+00 + 0.000D+00i 0.000D+00 + 0.000D+00i Nan + 0.000D+00i 152 0.000D+00 + 0.000D+00i 0.000D+00 + 0.000D+00i
150 0.000D+00 + 0.000D+00i 0.000D+00 + 0.000D+00i 0.000D+00 + 0.000D+00i 153 0.000D+00 + 0.000D+00i 0.000D+00 + 0.000D+00i
151 column 4 154 column 3 to 4
152 0.000D+00 + 0.000D+00i 155 0.000D+00 + 0.000D+00i 0.000D+00 + 0.000D+00i
153 0.000D+00 + 0.000D+00i 156 0.000D+00 + 0.000D+00i 0.000D+00 + 0.000D+00i
154 0.000D+00 + 0.000D+00i 157 Nan + 0.000D+00i 0.000D+00 + 0.000D+00i
155 Nan + 0.000D+00i 158 0.000D+00 + 0.000D+00i Nan + 0.000D+00i
156 " " 159 " "
157 ans = 160 ans =
158 -5.493D-01 + 0.000D+00i 161 -5.493D-01 + 0.000D+00i
@@ -161,6 +164,40 @@ end
161 -5.493D-01 - 1.571D+00i 164 -5.493D-01 - 1.571D+00i
162 0.000D+00 - 1.571D+00i 165 0.000D+00 - 1.571D+00i
163 5.493D-01 - 1.571D+00i 166 5.493D-01 - 1.571D+00i
164 Inf + Nani 167 Nan + Nani
165 8.047D-01 + 3.142D+00i 168 8.047D-01 + 3.142D+00i
166 5.493D-01 + 3.142D+00i 169 5.493D-01 + 3.142D+00i
170format("v")
171a= [0,0,%i*0.6795197,0.7161007+%i*0.3997826,0
1720,%i*0.977002,0,0,0
1730,0.2629713,0,0,0.4505416
1740,%i*0.8173032,0.529842,0,%i*0.8558751
1750,0,0,0.7481516,%i*0.2598704
1760,0.3402197+%i*0.3631865,0,0,0
1770,%i*0.8686947,%i*0.0844358,0.9883794,0
1780,0,0,0,0
1790,0.6540791,0.6892145+%i*0.3462334,0,0
1800,0,0,0,0.7204935]
181 a =
182 column 1 to 3
183 0. + 0.i 0. + 0.i 0. + 0.6795197i
184 0. + 0.i 0. + 0.977002i 0. + 0.i
185 0. + 0.i 0.2629713 + 0.i 0. + 0.i
186 0. + 0.i 0. + 0.8173032i 0.529842 + 0.i
187 0. + 0.i 0. + 0.i 0. + 0.i
188 0. + 0.i 0.3402197 + 0.3631865i 0. + 0.i
189 0. + 0.i 0. + 0.8686947i 0. + 0.0844358i
190 0. + 0.i 0. + 0.i 0. + 0.i
191 0. + 0.i 0.6540791 + 0.i 0.6892145 + 0.3462334i
192 0. + 0.i 0. + 0.i 0. + 0.i
193 column 4 to 5
194 0.7161007 + 0.3997826i 0. + 0.i
195 0. + 0.i 0. + 0.i
196 0. + 0.i 0.4505416 + 0.i
197 0. + 0.i 0. + 0.8558751i
198 0.7481516 + 0.i 0. + 0.2598704i
199 0. + 0.i 0. + 0.i
200 0.9883794 + 0.i 0. + 0.i
201 0. + 0.i 0. + 0.i
202 0. + 0.i 0. + 0.i
203 0. + 0.i 0.7204935 + 0.i
diff --git a/scilab/modules/ast/tests/nonreg_tests/bug_15781.tst b/scilab/modules/ast/tests/nonreg_tests/bug_15781.tst
index 281972f..bf7c97c 100644
--- a/scilab/modules/ast/tests/nonreg_tests/bug_15781.tst
+++ b/scilab/modules/ast/tests/nonreg_tests/bug_15781.tst
@@ -43,3 +43,16 @@ for f = ["v","e"]
43 43
44 acoth(-2:0.5:2).' 44 acoth(-2:0.5:2).'
45end 45end
46
47format("v")
48
49a= [0,0,%i*0.6795197,0.7161007+%i*0.3997826,0
500,%i*0.977002,0,0,0
510,0.2629713,0,0,0.4505416
520,%i*0.8173032,0.529842,0,%i*0.8558751
530,0,0,0.7481516,%i*0.2598704
540,0.3402197+%i*0.3631865,0,0,0
550,%i*0.8686947,%i*0.0844358,0.9883794,0
560,0,0,0,0
570,0.6540791,0.6892145+%i*0.3462334,0,0
580,0,0,0,0.7204935] \ No newline at end of file
diff --git a/scilab/modules/ast/tests/nonreg_tests/bug_16122.tst b/scilab/modules/ast/tests/nonreg_tests/bug_16122.tst
new file mode 100644
index 0000000..33b2ff9
--- /dev/null
+++ b/scilab/modules/ast/tests/nonreg_tests/bug_16122.tst
@@ -0,0 +1,21 @@
1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2019 - Stéphane MOTTELET
4//
5// This file is distributed under the same license as the Scilab package.
6// =============================================================================
7//
8// <-- CLI SHELL MODE -->
9// <-- NO CHECK REF -->
10//
11// <-- Non-regression test for bug 16122 -->
12//
13// <-- Bugzilla URL -->
14// http://bugzilla.scilab.org/16122
15//
16// <-- Short Description -->
17// polynomials with different variables are concatenated without error
18
19message = [ msprintf(gettext("Undefined operation for the given operands.\n"))
20 msprintf(gettext("check or define function %s for overloading.\n"),"%p_c_p")];
21assert_checkerror("[%s,%z]",message) \ No newline at end of file
diff --git a/scilab/modules/ast/tests/nonreg_tests/bug_14245.dia.ref b/scilab/modules/ast/tests/nonreg_tests/bug_16350.tst
index 60038d5..8af1ee0 100644
--- a/scilab/modules/ast/tests/nonreg_tests/bug_14245.dia.ref
+++ b/scilab/modules/ast/tests/nonreg_tests/bug_16350.tst
@@ -1,22 +1,23 @@
1// ============================================================================= 1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab 2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2015 - Scilab Enterprises - Cedric Delamarre 3// Copyright (C) 2020 - Stéphane MOTTELET
4// 4//
5// This file is distributed under the same license as the Scilab package. 5// This file is distributed under the same license as the Scilab package.
6// ============================================================================= 6// =============================================================================
7//
7// <-- CLI SHELL MODE --> 8// <-- CLI SHELL MODE -->
9// <-- NO CHECK REF -->
8// 10//
9// <-- Non-regression test for bug 14245 --> 11// <-- Non-regression test for bug 16350 -->
10// 12//
11// <-- Bugzilla URL --> 13// <-- Bugzilla URL -->
12// http://bugzilla.scilab.org/14245 14// http://bugzilla.scilab.org/16350
13// 15//
14// <-- Short Description --> 16// <-- Short Description -->
15// Problem in recursive extraction using list with struct 17// In if/while conditions, the empty sparse boolean is considered as TRUE.
16a=[1,2;3,4]; 18
17b=list(3,a); 19a = sparse(1)<2;
18c=5; 20a(1) = [];
19s=list(); 21b = 1;
20s(1)=struct("a",a,"b",b,"c",c); 22if a, b = 2; end
21s(2)=2; 23assert_checkequal(b,1);
22assert_checkequal(s(1).b(2)(1:3), [1 ; 3 ; 2]);
diff --git a/scilab/modules/ast/tests/nonreg_tests/bug_16373.dia.ref b/scilab/modules/ast/tests/nonreg_tests/bug_16373.dia.ref
new file mode 100644
index 0000000..6dc97d4
--- /dev/null
+++ b/scilab/modules/ast/tests/nonreg_tests/bug_16373.dia.ref
@@ -0,0 +1,22 @@
1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2019 - Chin Luh TAN
4//
5// This file is distributed under the same license as the Scilab package.
6// =============================================================================
7//
8// <-- CLI SHELL MODE -->
9//
10// <-- Non-regression test for bug 16373 -->
11//
12// <-- Bugzilla URL -->
13// http://bugzilla.scilab.org/16373
14//
15// <-- Short Description -->
16//fix issue of crashing in arm when displaying 0
17
18a = 0
19 a =
20
21 0.
22
diff --git a/scilab/modules/ast/tests/nonreg_tests/bug_16373.tst b/scilab/modules/ast/tests/nonreg_tests/bug_16373.tst
new file mode 100644
index 0000000..d16568a
--- /dev/null
+++ b/scilab/modules/ast/tests/nonreg_tests/bug_16373.tst
@@ -0,0 +1,18 @@
1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2019 - Chin Luh TAN
4//
5// This file is distributed under the same license as the Scilab package.
6// =============================================================================
7//
8// <-- CLI SHELL MODE -->
9//
10// <-- Non-regression test for bug 16373 -->
11//
12// <-- Bugzilla URL -->
13// http://bugzilla.scilab.org/16373
14//
15// <-- Short Description -->
16//fix issue of crashing in arm when displaying 0
17
18a = 0
diff --git a/scilab/modules/ast/tests/nonreg_tests/bug_16397.tst b/scilab/modules/ast/tests/nonreg_tests/bug_16397.tst
new file mode 100644
index 0000000..a0507e0
--- /dev/null
+++ b/scilab/modules/ast/tests/nonreg_tests/bug_16397.tst
@@ -0,0 +1,26 @@
1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2020 - Stéphane MOTTELET
4//
5// This file is distributed under the same license as the Scilab package.
6// =============================================================================
7// <-- CLI SHELL MODE -->
8// <-- NO CHECK REF -->
9//
10// <-- Non-regression test for bug 13936 -->
11//
12// <-- Bugzilla URL -->
13// http://bugzilla.scilab.org/16397
14//
15// <-- Short Description -->
16// display of long real vectors in the console is slow
17
18x=rand(1e4,1);
19tic;
20disp(x)
21t1 = toc();
22tic;
23disp([x,x])
24t2 = toc();
25
26assert_checktrue(t2/t1 > 8); \ No newline at end of file
diff --git a/scilab/modules/ast/tests/nonreg_tests/bug_16403.tst b/scilab/modules/ast/tests/nonreg_tests/bug_16403.tst
new file mode 100644
index 0000000..bf3affb
--- /dev/null
+++ b/scilab/modules/ast/tests/nonreg_tests/bug_16403.tst
@@ -0,0 +1,34 @@
1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2020 - Stéphane MOTTELET
4//
5// This file is distributed under the same license as the Scilab package.
6// =============================================================================
7//
8// <-- CLI SHELL MODE -->
9// <-- NO CHECK REF -->
10//
11// <-- Non-regression test for bug 16144 -->
12//
13// <-- Bugzilla URL -->
14// http://bugzilla.scilab.org/16403
15//
16// <-- Short Description -->
17// 1D extraction of matrix with implicit index has wrong dimensions
18
19a = [1 3 5
20 2 4 6];
21k = 1:3;
22assert_checkequal(a(1:3),[1, 2, 3]);
23assert_checkequal(a(k),[1, 2, 3]);
24assert_checkequal(a(k'),[1; 2; 3]);
25
26// extracted vectors keep the shape of source
27x=[1, 2, 3, 4, 5, 6];
28assert_checkequal(x(1:3),[1, 2, 3]);
29assert_checkequal(x(k),[1, 2, 3]);
30assert_checkequal(x(k'),[1, 2, 3]);
31x=[1; 2; 3; 4; 5; 6];
32assert_checkequal(x(1:3),[1; 2; 3]);
33assert_checkequal(x(k),[1; 2; 3]);
34assert_checkequal(x(k'),[1; 2; 3]);
diff --git a/scilab/modules/ast/tests/nonreg_tests/bug_16449.tst b/scilab/modules/ast/tests/nonreg_tests/bug_16449.tst
new file mode 100644
index 0000000..4745502
--- /dev/null
+++ b/scilab/modules/ast/tests/nonreg_tests/bug_16449.tst
@@ -0,0 +1,21 @@
1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2020 - Stéphane MOTTELET
4//
5// This file is distributed under the same license as the Scilab package.
6// =============================================================================
7//
8// <-- CLI SHELL MODE -->
9// <-- NO CHECK REF -->
10//
11// <-- Non-regression test for bug 16449 -->
12//
13// <-- Bugzilla URL -->
14// http://bugzilla.scilab.org/16449
15//
16// <-- Short Description -->
17// insertion of implicit vector in cell crashes Scilab
18
19b = cell(1,1);
20b{1} = 1:3;
21disp(b)
diff --git a/scilab/modules/ast/tests/nonreg_tests/bug_16459.dia.ref b/scilab/modules/ast/tests/nonreg_tests/bug_16459.dia.ref
new file mode 100644
index 0000000..349ab0e
--- /dev/null
+++ b/scilab/modules/ast/tests/nonreg_tests/bug_16459.dia.ref
@@ -0,0 +1,34 @@
1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2020 - Stéphane MOTTELET
4//
5// This file is distributed under the same license as the Scilab package.
6// =============================================================================
7//
8// <-- CLI SHELL MODE -->
9//
10// <-- Non-regression test for bug 16459 -->
11//
12// <-- Bugzilla URL -->
13// http://bugzilla.scilab.org/16459
14//
15// <-- Short Description -->
16// The display of one column hypermatrix is wrong
17matrix(1:8, [1,1,2,2,2])
18 ans =
19(:,:,1,1,1)
20 1.
21(:,:,2,1,1)
22 2.
23(:,:,1,2,1)
24 3.
25(:,:,2,2,1)
26 4.
27(:,:,1,1,2)
28 5.
29(:,:,2,1,2)
30 6.
31(:,:,1,2,2)
32 7.
33(:,:,2,2,2)
34 8.
diff --git a/scilab/modules/ast/tests/nonreg_tests/bug_16459.tst b/scilab/modules/ast/tests/nonreg_tests/bug_16459.tst
new file mode 100644
index 0000000..4850084
--- /dev/null
+++ b/scilab/modules/ast/tests/nonreg_tests/bug_16459.tst
@@ -0,0 +1,18 @@
1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2020 - Stéphane MOTTELET
4//
5// This file is distributed under the same license as the Scilab package.
6// =============================================================================
7//
8// <-- CLI SHELL MODE -->
9//
10// <-- Non-regression test for bug 16459 -->
11//
12// <-- Bugzilla URL -->
13// http://bugzilla.scilab.org/16459
14//
15// <-- Short Description -->
16// The display of one column hypermatrix is wrong
17
18matrix(1:8, [1,1,2,2,2])
diff --git a/scilab/modules/ast/tests/nonreg_tests/bug_16473.tst b/scilab/modules/ast/tests/nonreg_tests/bug_16473.tst
new file mode 100644
index 0000000..3879965
--- /dev/null
+++ b/scilab/modules/ast/tests/nonreg_tests/bug_16473.tst
@@ -0,0 +1,25 @@
1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2020 - Stéphane MOTTELET
4//
5// This file is distributed under the same license as the Scilab package.
6// =============================================================================
7//
8// <-- CLI SHELL MODE -->
9// <-- NO CHECK REF -->
10//
11// <-- Non-regression test for bug 16473 -->
12//
13// <-- Bugzilla URL -->
14// http://bugzilla.scilab.org/16473
15//
16// <-- Short Description -->
17// Deleting rows with [] insertion in a sparse matrix squares it with padding zeros or %F
18
19m = int(sprand(10,3,0.5)*10);
20m([2 5],:) = [];
21assert_checkequal(size(m),[8 3]);
22
23s = sprand(10,3,0.5);
24s(3,:) = [];
25assert_checkequal(size(s),[9 3]);
diff --git a/scilab/modules/ast/tests/nonreg_tests/bug_16483.tst b/scilab/modules/ast/tests/nonreg_tests/bug_16483.tst
new file mode 100644
index 0000000..33b0a99
--- /dev/null
+++ b/scilab/modules/ast/tests/nonreg_tests/bug_16483.tst
@@ -0,0 +1,23 @@
1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2020 - Stéphane MOTTELET
4//
5// This file is distributed under the same license as the Scilab package.
6// =============================================================================
7//
8// <-- CLI SHELL MODE -->
9// <-- NO CHECK REF -->
10//
11// <-- Non-regression test for bug 16483 -->
12//
13// <-- Bugzilla URL -->
14// http://bugzilla.scilab.org/16483
15//
16// <-- Short Description -->
17// substraction of complex polynomial matrices is broken (Scilab 6 regression)
18
19A=[%i+%s 0;0 %s];
20B=[%i+%s 0;0 0];
21
22assert_checkequal(A-B,[0 0;0 %s])
23assert_checkequal(B-A,[0 0;0 -%s])
diff --git a/scilab/modules/ast/tests/unit_tests/concatenation.tst b/scilab/modules/ast/tests/unit_tests/concatenation.tst
index 55cfb43..b52834c 100644
--- a/scilab/modules/ast/tests/unit_tests/concatenation.tst
+++ b/scilab/modules/ast/tests/unit_tests/concatenation.tst
@@ -30,8 +30,8 @@ checkCallOverload("[list(1) list(2)]");
30// Double 30// Double
31assert_checkequal([ldouble ldouble], [1 2 3 1 2 3]); 31assert_checkequal([ldouble ldouble], [1 2 3 1 2 3]);
32assert_checkequal([ldouble lbool], [ldouble double(lbool)]); 32assert_checkequal([ldouble lbool], [ldouble double(lbool)]);
33checkCallOverload("[ldouble lint]"); 33assert_checkequal([ldouble lint], [ldouble double(lint)]);
34checkCallOverload("[ldouble lint16]"); 34assert_checkequal([ldouble lint16], [ldouble double(lint16)]);
35assert_checkequal([ldouble lpoly], [(ldouble + 0*%s) lpoly]); 35assert_checkequal([ldouble lpoly], [(ldouble + 0*%s) lpoly]);
36assert_checkequal([ldouble lsparse], [sparse(ldouble) lsparse]); 36assert_checkequal([ldouble lsparse], [sparse(ldouble) lsparse]);
37checkCallOverload("[ldouble lspb]"); 37checkCallOverload("[ldouble lspb]");
@@ -40,8 +40,8 @@ checkCallOverload("[ldouble lsta]");
40 40
41assert_checkequal([ldouble ; ldouble], matrix([1 1 2 2 3 3], 2, 3)); 41assert_checkequal([ldouble ; ldouble], matrix([1 1 2 2 3 3], 2, 3));
42assert_checkequal([ldouble ; lbool], [ldouble ; double(lbool)]); 42assert_checkequal([ldouble ; lbool], [ldouble ; double(lbool)]);
43checkCallOverload("[ldouble ; lint]"); 43assert_checkequal([ldouble ; lint], [ldouble ; double(lint)]);
44checkCallOverload("[ldouble ; lint16]"); 44assert_checkequal([ldouble ; lint16],[ldouble ; double(lint16)]);
45assert_checkequal([ldouble ; lpoly], [(ldouble + 0*%s) ; lpoly]); 45assert_checkequal([ldouble ; lpoly], [(ldouble + 0*%s) ; lpoly]);
46assert_checkequal([ldouble ; lsparse], [sparse(ldouble) ; lsparse]); 46assert_checkequal([ldouble ; lsparse], [sparse(ldouble) ; lsparse]);
47checkCallOverload("[ldouble ; lspb]"); 47checkCallOverload("[ldouble ; lspb]");
@@ -70,7 +70,7 @@ checkCallOverload("[lbool ; lstring]");
70checkCallOverload("[lbool ; lsta]"); 70checkCallOverload("[lbool ; lsta]");
71 71
72// int 72// int
73checkCallOverload("[lint ldouble]"); 73assert_checkequal([lint ldouble], [double(lint) ldouble]);
74assert_checkequal([lint lbool], int32([1 2 3 1 0 1])); 74assert_checkequal([lint lbool], int32([1 2 3 1 0 1]));
75assert_checkequal([lint lint], int32([1 2 3 1 2 3])); 75assert_checkequal([lint lint], int32([1 2 3 1 2 3]));
76checkCallOverload("[lint lint16]"); 76checkCallOverload("[lint lint16]");
@@ -80,7 +80,7 @@ checkCallOverload("[lint lspb]");
80checkCallOverload("[lint lstring]"); 80checkCallOverload("[lint lstring]");
81checkCallOverload("[lint lsta]"); 81checkCallOverload("[lint lsta]");
82 82
83checkCallOverload("[lint ; ldouble]"); 83assert_checkequal([lint ; ldouble], [double(lint) ; ldouble]);
84assert_checkequal([lint ; lbool], int32([1 2 3;1 0 1])); 84assert_checkequal([lint ; lbool], int32([1 2 3;1 0 1]));
85assert_checkequal([lint ; lint], int32(matrix([1 1 2 2 3 3], 2, 3))); 85assert_checkequal([lint ; lint], int32(matrix([1 1 2 2 3 3], 2, 3)));
86checkCallOverload("[lint ; lint16]"); 86checkCallOverload("[lint ; lint16]");
diff --git a/scilab/modules/ast/tests/unit_tests/krondivide.tst b/scilab/modules/ast/tests/unit_tests/krondivide.tst
index 1b4582a..b4ad660 100644
--- a/scilab/modules/ast/tests/unit_tests/krondivide.tst
+++ b/scilab/modules/ast/tests/unit_tests/krondivide.tst
@@ -1,7 +1,7 @@
1// ============================================================================ 1// ============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab 2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// 3//
4// Copyright (C) 2019 - Samuel GOUGEON 4// Copyright (C) 2019-2020 - Samuel GOUGEON
5// 5//
6// This file is distributed under the same license as the Scilab package. 6// This file is distributed under the same license as the Scilab package.
7// ============================================================================ 7// ============================================================================
@@ -76,3 +76,19 @@ for i = 1:n
76 assert_checkalmostequal(o2 .\. b, o, rtol) 76 assert_checkalmostequal(o2 .\. b, o, rtol)
77 end 77 end
78end 78end
79
80// Between sparse matrices
81// =======================
82rtol = 10*%eps;
83objects = list(sprand(10,1,0.5), sprand(1,8,0.5), sprand(5,5,0.5));
84n = length(objects);
85
86for i = 1:n
87 o = objects(i);
88 for j = 1:n
89 o2 = objects(j);
90 b = o .*. o2;
91 assert_checkalmostequal(b ./. o2, o, rtol)
92 assert_checkalmostequal(o .\. b, o2, rtol)
93 end
94end
diff --git a/scilab/modules/ast/tests/unit_tests/parser.dia.ref b/scilab/modules/ast/tests/unit_tests/parser.dia.ref
deleted file mode 100644
index 483f4fa..0000000
--- a/scilab/modules/ast/tests/unit_tests/parser.dia.ref
+++ /dev/null
@@ -1,640 +0,0 @@
1// ============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2016 - DIGITEO - Cedric Delamarre
4//
5// This file is distributed under the same license as the Scilab package.
6// ============================================================================
7// <-- CLI SHELL MODE -->
8// line break
9colvect(1,1) = 1;
10colvect(2,1) = -2;
11linevect = colvect';
12a=[1; ...
13-2];
14assert_checkequal(a, colvect);
15a=[1;...
16-2];
17assert_checkequal(a, colvect);
18a=[1; ...
19 -2];
20assert_checkequal(a, colvect);
21a=[1;...
22 -2];
23assert_checkequal(a, colvect);
24a=[1; ...
25- 2];
26assert_checkequal(a, colvect);
27a=[1;...
28- 2];
29assert_checkequal(a, colvect);
30a=[1 ...
31-2];
32assert_checkequal(a, linevect);
33a=[1...
34-2];
35assert_checkequal(a, -1);
36a=[1 ...
37 -2];
38assert_checkequal(a, linevect);
39a=[1...
40 -2];
41assert_checkequal(a, linevect);
42a=[1 ...
43- 2];
44assert_checkequal(a, -1);
45a=[1...
46- 2];
47assert_checkequal(a, -1);
48a=[1; ...//comment
49-2];
50assert_checkequal(a, colvect);
51a=[1;...//comment
52-2];
53assert_checkequal(a, colvect);
54a=[1; ...//comment
55 -2];
56assert_checkequal(a, colvect);
57a=[1;...//comment
58 -2];
59assert_checkequal(a, colvect);
60a=[1; ...//comment
61- 2];
62assert_checkequal(a, colvect);
63a=[1;...//comment
64- 2];
65assert_checkequal(a, colvect);
66a=[1 ...//comment
67-2];
68assert_checkequal(a, linevect);
69a=[1...//comment
70-2];
71assert_checkequal(a, -1);
72a=[1 ...//comment
73 -2];
74assert_checkequal(a, linevect);
75a=[1...//comment
76 -2];
77assert_checkequal(a, linevect);
78a=[1 ...//comment
79- 2];
80assert_checkequal(a, -1);
81a=[1...//comment
82- 2];
83assert_checkequal(a, -1);
84a=[1 ...
85-2 ];
86assert_checkequal(a, linevect);
87a=[1...
88-2 ];
89assert_checkequal(a, -1);
90a=[1 ...
91 -2 ];
92assert_checkequal(a, linevect);
93a=[1...
94 -2 ];
95assert_checkequal(a, linevect);
96a=[1 ...
97- 2 ];
98assert_checkequal(a, -1);
99a=[1...
100- 2 ];
101assert_checkequal(a, -1);
102// Operators within matrices
103// DOTTIMES
104a = [[2 3] .* -3];
105expected = [-6 -9];
106assert_checkequal(a, expected);
107a = [[2 3] .* ...
108-3];
109assert_checkequal(a, expected);
110a = [[2 3] .* ... // a comment
111-3];
112assert_checkequal(a, expected);
113//DOTRDIVIDE
114a = [[2 3] ./ -3];
115expected = [-2/3 -1];
116assert_checkequal(a, expected);
117a = [[2 3] ./ ...
118-3];
119assert_checkequal(a, expected);
120a = [[2 3] ./ ... // a comment
121-3];
122assert_checkequal(a, expected);
123//DOTLDIVIDE
124a = [[2 3] .\ -3];
125expected = [-3/2 -1];
126assert_checkequal(a, expected);
127a = [[2 3] .\ ...
128-3];
129assert_checkequal(a, expected);
130a = [[2 3] .\ ... // a comment
131-3];
132assert_checkequal(a, expected);
133//DOTPOWER
134a = [[2 3] .^ -3];
135expected = [(2^(-3)), (3^(-3))];
136assert_checkequal(a, expected);
137a = [[2 3] .^ ...
138-3];
139assert_checkequal(a, expected);
140a = [[2 3] .^ ... // a comment
141-3];
142assert_checkequal(a, expected);
143//MINUS
144a = [[2 3] - -3];
145expected = [(2-(-3)), (3-(-3))];
146assert_checkequal(a, expected);
147a = [[2 3] - ...
148-3];
149assert_checkequal(a, expected);
150a = [[2 3] - ... // a comment
151-3];
152assert_checkequal(a, expected);
153//PLUS
154a = [[2 3] + -3];
155expected = [(2+(-3)), (3+(-3))];
156assert_checkequal(a, expected);
157a = [[2 3] + ...
158-3];
159assert_checkequal(a, expected);
160a = [[2 3] + ... // a comment
161-3];
162assert_checkequal(a, expected);
163//TIMES
164a = [2 * -3];
165expected = [(2*(-3))];
166assert_checkequal(a, expected);
167a = [2 * ...
168 -3];
169assert_checkequal(a, expected);
170a = [2 * ... // a comment
171 -3];
172assert_checkequal(a, expected);
173//RDIVIDE
174a = [2 / -3];
175expected = [(2/(-3))];
176assert_checkequal(a, expected);
177a = [2 / ...
178 -3];
179assert_checkequal(a, expected);
180a = [2 / ... // a comment
181 -3];
182assert_checkequal(a, expected);
183//LDIVIDE
184a = [2 \ -3];
185expected = [(2\(-3))];
186assert_checkequal(a, expected);
187a = [2 \ ...
188 -3];
189assert_checkequal(a, expected);
190a = [2 \ ... // a comment
191 -3];
192assert_checkequal(a, expected);
193//POWER
194a = [2 ^ -3];
195expected = [(2^(-3))];
196assert_checkequal(a, expected);
197a = [2 ^ ...
198 -3];
199assert_checkequal(a, expected);
200a = [2 ^ ... // a comment
201 -3];
202assert_checkequal(a, expected);
203//KRONTIMES
204a = [[2 3] .*. -3];
205expected = [([2, 3].*.(-3))];
206assert_checkequal(a, expected);
207a = [[2 3] .*. ...
208 -3];
209assert_checkequal(a, expected);
210a = [[2 3] .*. ... // a comment
211 -3];
212assert_checkequal(a, expected);
213//KRONRDIVIDE
214a = [[2 3] ./. -3];
215expected = -[2 3] / 3;
216assert_checkequal(a, expected);
217a = [[2 3] ./. ...
218 -3];
219assert_checkequal(a, expected);
220a = [[2 3] ./. ... // a comment
221 -3];
222assert_checkequal(a, expected);
223//KRONLDIVIDE
224a = [-3 .\. [2 3]];
225assert_checkequal(a, expected);
226a = [-3 .\. ...
227 [2 3]];
228assert_checkequal(a, expected);
229a = [-3 .\. ... // a comment
230 [2 3]];
231assert_checkequal(a, expected);
232//EQ
233a = [[2 3] == -3];
234expected = [([2, 3]==(-3))];
235assert_checkequal(a, expected);
236a = [[2 3] == ...
237 -3];
238assert_checkequal(a, expected);
239a = [[2 3] == ... // a comment
240 -3];
241assert_checkequal(a, expected);
242//NE
243a = [[2 3] ~= -3];
244expected = [([2, 3]~=(-3))];
245assert_checkequal(a, expected);
246a = [[2 3] ~= ...
247 -3];
248assert_checkequal(a, expected);
249a = [[2 3] ~= ... // a comment
250 -3];
251assert_checkequal(a, expected);
252//LT
253a = [[2 3] < -3];
254expected = [([2, 3]<(-3))];
255assert_checkequal(a, expected);
256a = [[2 3] < ...
257 -3];
258assert_checkequal(a, expected);
259a = [[2 3] < ... // a comment
260 -3];
261assert_checkequal(a, expected);
262//GT
263a = [[2 3] > -3];
264expected = [([2, 3]>(-3))];
265assert_checkequal(a, expected);
266a = [[2 3] > ...
267 -3];
268assert_checkequal(a, expected);
269a = [[2 3] > ... // a comment
270 -3];
271assert_checkequal(a, expected);
272//LE
273a = [[2 3] <= -3];
274expected = [([2, 3]<=(-3))];
275assert_checkequal(a, expected);
276a = [[2 3] <= ...
277 -3];
278assert_checkequal(a, expected);
279a = [[2 3] <= ... // a comment
280 -3];
281assert_checkequal(a, expected);
282//GE
283a = [[2 3] >= -3];
284expected = [([2, 3]>=(-3))];
285assert_checkequal(a, expected);
286a = [[2 3] >= ...
287 -3];
288assert_checkequal(a, expected);
289a = [[2 3] >= ... // a comment
290 -3];
291assert_checkequal(a, expected);
292// bug_14361
293a=[1; .../* a comment */
294-2];
295assert_checkequal(a, colvect);
296a=[1;.../* a comment */
297-2];
298assert_checkequal(a, colvect);
299a=[1; .../* a comment */
300 -2];
301assert_checkequal(a, colvect);
302a=[1;.../* a comment */
303 -2];
304assert_checkequal(a, colvect);
305a=[1; .../* a comment */
306- 2];
307assert_checkequal(a, colvect);
308a=[1;.../* a comment */
309- 2];
310assert_checkequal(a, colvect);
311a=[1 .../* a comment */
312-2];
313assert_checkequal(a, linevect);
314a=[1.../* a comment */
315-2];
316assert_checkequal(a, -1);
317a=[1 .../* a comment */
318 -2];
319assert_checkequal(a, linevect);
320a=[1.../* a comment */
321 -2];
322assert_checkequal(a, linevect);
323a=[1 .../* a comment */
324- 2];
325assert_checkequal(a, -1);
326a=[1.../* a comment */
327- 2];
328assert_checkequal(a, -1);
329// Operators within matrices
330// DOTTIMES
331a = [[2 3] .* ... /* a comment */
332-3];
333expected = [-6 -9];
334assert_checkequal(a, expected);
335//DOTRDIVIDE
336a = [[2 3] ./ ... /* a comment */
337-3];
338expected = [-2/3 -1];
339assert_checkequal(a, expected);
340//DOTLDIVIDE
341a = [[2 3] .\ ... /* a comment */
342-3];
343expected = [-3/2 -1];
344assert_checkequal(a, expected);
345//DOTPOWER
346a = [[2 3] .^ ... /* a comment */
347-3];
348expected = [(2^(-3)), (3^(-3))];
349assert_checkequal(a, expected);
350//MINUS
351a = [[2 3] - ... /* a comment */
352-3];
353expected = [(2-(-3)), (3-(-3))];
354assert_checkequal(a, expected);
355//PLUS
356a = [[2 3] + ... /* a comment */
357-3];
358expected = [(2+(-3)), (3+(-3))];
359assert_checkequal(a, expected);
360//TIMES
361a = [2 * ... /* a comment */
362 -3];
363expected = [(2*(-3))];
364assert_checkequal(a, expected);
365//RDIVIDE
366a = [2 / ... /* a comment */
367 -3];
368expected = [(2/(-3))];
369assert_checkequal(a, expected);
370//LDIVIDE
371a = [2 \ ... /* a comment */
372 -3];
373expected = [(2\(-3))];
374assert_checkequal(a, expected);
375//POWER
376a = [2 ^ ... /* a comment */
377 -3];
378expected = [(2^(-3))];
379assert_checkequal(a, expected);
380//KRONTIMES
381a = [[2 3] .*. ... /* a comment */
382 -3];
383expected = [([2, 3].*.(-3))];
384assert_checkequal(a, expected);
385//kronrdivide
386a = [[2 3] ./. ... /* a comment */
387 -3];
388expected = [([2, 3] ./. (-3))];
389assert_checkequal(a, expected);
390//KRONLDIVIDE
391a = [-3 .\. ... /* a comment */
392 [2 3]];
393assert_checkequal(a, expected);
394//EQ
395a = [[2 3] == ... /* a comment */
396 -3];
397expected = [([2, 3]==(-3))];
398assert_checkequal(a, expected);
399//NE
400a = [[2 3] ~= ... /* a comment */
401 -3];
402expected = [([2, 3]~=(-3))];
403assert_checkequal(a, expected);
404//LT
405a = [[2 3] < ... /* a comment */
406 -3];
407expected = [([2, 3]<(-3))];
408assert_checkequal(a, expected);
409//GT
410a = [[2 3] > ... /* a comment */
411 -3];
412expected = [([2, 3]>(-3))];
413assert_checkequal(a, expected);
414//LE
415a = [[2 3] <= ... /* a comment */
416 -3];
417expected = [([2, 3]<=(-3))];
418assert_checkequal(a, expected);
419//GE
420a = [[2 3] >= ... /* a comment */
421 -3];
422expected = [([2, 3]>=(-3))];
423assert_checkequal(a, expected);
424// Comments on several lines
425a=[1; .../* a comment
426 on several lines */
427-2];
428assert_checkequal(a, colvect);
429a=[1;.../* a comment
430 on several lines */
431-2];
432assert_checkequal(a, colvect);
433a=[1; .../* a comment
434 on several lines */
435 -2];
436assert_checkequal(a, colvect);
437a=[1;.../* a comment
438 on several lines */
439 -2];
440assert_checkequal(a, colvect);
441a=[1; .../* a comment
442 on several lines */
443- 2];
444assert_checkequal(a, colvect);
445a=[1;.../* a comment
446 on several lines */
447- 2];
448assert_checkequal(a, colvect);
449a=[1 .../* a comment
450 on several lines */
451-2];
452assert_checkequal(a, linevect);
453a=[1.../* a comment
454 on several lines */
455-2];
456assert_checkequal(a, -1);
457a=[1 .../* a comment
458 on several lines */
459 -2];
460assert_checkequal(a, linevect);
461a=[1.../* a comment
462 on several lines */
463 -2];
464assert_checkequal(a, linevect);
465a=[1 .../* a comment
466 on several lines */
467- 2];
468assert_checkequal(a, -1);
469a=[1.../* a comment
470 on several lines */
471- 2];
472assert_checkequal(a, -1);
473// Operators within matrices
474// DOTTIMES
475a = [[2 3] .* ... /* a comment
476 on several lines */
477-3];
478expected = [-6 -9];
479assert_checkequal(a, expected);
480//DOTRDIVIDE
481a = [[2 3] ./ ... /* a comment
482 on several lines */
483-3];
484expected = [-2/3 -1];
485assert_checkequal(a, expected);
486//DOTLDIVIDE
487a = [[2 3] .\ ... /* a comment
488 on several lines */
489-3];
490expected = [-3/2 -1];
491assert_checkequal(a, expected);
492//DOTPOWER
493a = [[2 3] .^ ... /* a comment
494 on several lines */
495-3];
496expected = [(2^(-3)), (3^(-3))];
497assert_checkequal(a, expected);
498//MINUS
499a = [[2 3] - ... /* a comment
500 on several lines */
501-3];
502expected = [(2-(-3)), (3-(-3))];
503assert_checkequal(a, expected);
504//PLUS
505a = [[2 3] + ... /* a comment
506 on several lines */
507-3];
508expected = [(2+(-3)), (3+(-3))];
509assert_checkequal(a, expected);
510//TIMES
511a = [2 * ... /* a comment
512 on several lines */
513 -3];
514expected = [(2*(-3))];
515assert_checkequal(a, expected);
516//RDIVIDE
517a = [2 / ... /* a comment
518 on several lines */
519 -3];
520expected = [(2/(-3))];
521assert_checkequal(a, expected);
522//LDIVIDE
523a = [2 \ ... /* a comment
524 on several lines */
525 -3];
526expected = [(2\(-3))];
527assert_checkequal(a, expected);
528//POWER
529a = [2 ^ ... /* a comment
530 on several lines */
531 -3];
532expected = [(2^(-3))];
533assert_checkequal(a, expected);
534//KRONTIMES
535a = [[2 3] .*. ... /* a comment
536 on several lines */
537 -3];
538expected = [([2, 3].*.(-3))];
539assert_checkequal(a, expected);
540//KRONRDIVIDE
541a = [[2 3] ./. ... /* a comment
542 on several lines */
543 -3];
544expected = [([2, 3]./.(-3))];
545assert_checkequal(a, expected);
546//KRONLDIVIDE
547a = [ -3 .\. ... /* a comment
548 on several lines */
549 [2 3] ];
550assert_checkequal(a, expected);
551//EQ
552a = [[2 3] == ... /* a comment
553 on several lines */
554 -3];
555expected = [([2, 3]==(-3))];
556assert_checkequal(a, expected);
557//NE
558a = [[2 3] ~= ... /* a comment
559 on several lines */
560 -3];
561expected = [([2, 3]~=(-3))];
562assert_checkequal(a, expected);
563//LT
564a = [[2 3] < ... /* a comment
565 on several lines */
566 -3];
567expected = [([2, 3]<(-3))];
568assert_checkequal(a, expected);
569//GT
570a = [[2 3] > ... /* a comment
571 on several lines */
572 -3];
573expected = [([2, 3]>(-3))];
574assert_checkequal(a, expected);
575//LE
576a = [[2 3] <= ... /* a comment
577 on several lines */
578 -3];
579expected = [([2, 3]<=(-3))];
580assert_checkequal(a, expected);
581//GE
582a = [[2 3] >= ... /* a comment
583 on several lines */
584 -3];
585expected = [([2, 3]>=(-3))];
586assert_checkequal(a, expected);
587// Special behaviour of ... with + and -
588a = [1 +...
5892]
590 a =
591 3.
592expected = 3;
593assert_checkequal(a, expected);
594a = [1 +...
595 2]
596 a =
597 3.
598expected = 3;
599assert_checkequal(a, expected);
600a = [1 +...
601 +2]
602 a =
603 3.
604expected = 3;
605assert_checkequal(a, expected);
606a = [1 -...
6072]
608 a =
609 -1.
610expected = -1;
611assert_checkequal(a, expected);
612a = [1 -...
613 2]
614 a =
615 -1.
616expected = -1;
617assert_checkequal(a, expected);
618a = [1 -...
619 -2]
620 a =
621 3.
622expected = 3;
623assert_checkequal(a, expected);
624// Case with multiline comment
625str_cmd = ["a = [1 -... /* the start of a";
626 "multiline comment */ 2 3]"]; // this currently generates an error
627assert_checktrue(execstr(str_cmd, "errcatch") <> 0);
628// bug_14374 comments in SHELLMODE
629// Testing if shellmode execution with command
630// convstr a u // a comment
631// convstr a /* a comment */
632// convstr a u /* some text
633// ending comment here */
634exec(SCI + "/modules/ast/tests/nonreg_tests/bug_14374.tst");
635// Bug 7646: matrix transpose extraction
636exec(SCI + "/modules/ast/tests/nonreg_tests/bug_7646.tst");
637// Bug 14662: matrix concatenation with simple quote and space led to a parser error
638exec(SCI + "/modules/ast/tests/nonreg_tests/bug_14662.tst");
639// Bug 14667: multi line string in matrix generated a non terminal parser state
640exec(SCI + "/modules/ast/tests/nonreg_tests/bug_14667.tst");
diff --git a/scilab/modules/ast/tests/unit_tests/parser.tst b/scilab/modules/ast/tests/unit_tests/parser.tst
index 743fd58..195e0e3 100644
--- a/scilab/modules/ast/tests/unit_tests/parser.tst
+++ b/scilab/modules/ast/tests/unit_tests/parser.tst
@@ -1,11 +1,13 @@
1// ============================================================================ 1// ============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab 2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2016 - DIGITEO - Cedric Delamarre 3// Copyright (C) 2016 - DIGITEO - Cedric Delamarre
4// Copyright (C) 2016 - Scilab Enterprises - Pierre-Aime Agnel
4// 5//
5// This file is distributed under the same license as the Scilab package. 6// This file is distributed under the same license as the Scilab package.
6// ============================================================================ 7// ============================================================================
7 8
8// <-- CLI SHELL MODE --> 9// <-- CLI SHELL MODE -->
10// <-- NO CHECK REF -->
9 11
10 12
11// line break 13// line break
@@ -356,8 +358,8 @@ a = [[2 3] >= ... // a comment
356 -3]; 358 -3];
357assert_checkequal(a, expected); 359assert_checkequal(a, expected);
358 360
359// bug_14361 361// http://bugzilla.scilab.org/14361 :
360 362// --------------------------------
361a=[1; .../* a comment */ 363a=[1; .../* a comment */
362-2]; 364-2];
363assert_checkequal(a, colvect); 365assert_checkequal(a, colvect);
@@ -731,6 +733,8 @@ str_cmd = ["a = [1 -... /* the start of a";
731 "multiline comment */ 2 3]"]; // this currently generates an error 733 "multiline comment */ 2 3]"]; // this currently generates an error
732assert_checktrue(execstr(str_cmd, "errcatch") <> 0); 734assert_checktrue(execstr(str_cmd, "errcatch") <> 0);
733 735
736// --------------------------------------------
737
734// bug_14374 comments in SHELLMODE 738// bug_14374 comments in SHELLMODE
735// Testing if shellmode execution with command 739// Testing if shellmode execution with command
736// convstr a u // a comment 740// convstr a u // a comment
diff --git a/scilab/modules/atoms/macros/atoms_internals/atomsDownload.sci b/scilab/modules/atoms/macros/atoms_internals/atomsDownload.sci
index fa60f03..2e40d3e 100644
--- a/scilab/modules/atoms/macros/atoms_internals/atomsDownload.sci
+++ b/scilab/modules/atoms/macros/atoms_internals/atomsDownload.sci
@@ -122,7 +122,7 @@ function atomsDownload(url_in,file_out,md5sum)
122 timeout_arg = " --connect-timeout "; 122 timeout_arg = " --connect-timeout ";
123 else 123 else
124 // wget 124 // wget
125 timeout_arg = " --timeout="; 125 timeout_arg = " --no-timestamping --no-page-requisites --no-recursive --timeout=";
126 end 126 end
127 127
128 timeout = strtod(atomsGetConfig("downloadTimeout")); 128 timeout = strtod(atomsGetConfig("downloadTimeout"));
diff --git a/scilab/modules/core/help/en_US/1_keywords/backslash.xml b/scilab/modules/core/help/en_US/1_keywords/backslash.xml
index e7a9d66..040678d 100644
--- a/scilab/modules/core/help/en_US/1_keywords/backslash.xml
+++ b/scilab/modules/core/help/en_US/1_keywords/backslash.xml
@@ -5,7 +5,7 @@
5 xml:lang="en" xml:id="backslash"> 5 xml:lang="en" xml:id="backslash">
6 <refnamediv> 6 <refnamediv>
7 <refname>backslash</refname> 7 <refname>backslash</refname>
8 <refpurpose>(\) left matrix division.</refpurpose> 8 <refpurpose>(\) left matrix division: Exact or least square solution</refpurpose>
9 </refnamediv> 9 </refnamediv>
10 <refsynopsisdiv> 10 <refsynopsisdiv>
11 <title>Syntax</title> 11 <title>Syntax</title>
@@ -119,6 +119,9 @@ mprintf('\ntime with backslash: %.3f\n',toc());
119 <link linkend="slash">slash</link> 119 <link linkend="slash">slash</link>
120 </member> 120 </member>
121 <member> 121 <member>
122 <link linkend="lsq">lsq</link>
123 </member>
124 <member>
122 <link linkend="inv">inv</link> 125 <link linkend="inv">inv</link>
123 </member> 126 </member>
124 <member> 127 <member>
@@ -131,6 +134,9 @@ mprintf('\ntime with backslash: %.3f\n',toc());
131 <link linkend="umfpack">umfpack</link> 134 <link linkend="umfpack">umfpack</link>
132 </member> 135 </member>
133 <member> 136 <member>
137 <link linkend="datafit">datafit</link>
138 </member>
139 <member>
134 <link linkend="krondivide">kron .\.</link> 140 <link linkend="krondivide">kron .\.</link>
135 </member> 141 </member>
136 <member> 142 <member>
diff --git a/scilab/modules/core/help/en_US/1_keywords/brackets.xml b/scilab/modules/core/help/en_US/1_keywords/brackets.xml
index 9a99878..1791858 100644
--- a/scilab/modules/core/help/en_US/1_keywords/brackets.xml
+++ b/scilab/modules/core/help/en_US/1_keywords/brackets.xml
@@ -2,7 +2,7 @@
2<!-- 2<!--
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab 3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2012 - 2016 - Scilab Enterprises 4 * Copyright (C) 2012 - 2016 - Scilab Enterprises
5 * Copyright (C) 2016, 2018 - Samuel GOUGEON 5 * Copyright (C) 2016 - 2020 - Samuel GOUGEON
6 * 6 *
7 * This file is hereby licensed under the terms of the GNU GPL v2.0, 7 * This file is hereby licensed under the terms of the GNU GPL v2.0,
8 * pursuant to article 5.3.4 of the CeCILL v.2.1. 8 * pursuant to article 5.3.4 of the CeCILL v.2.1.
@@ -161,10 +161,7 @@
161 rules are the following: 161 rules are the following:
162 <orderedlist> 162 <orderedlist>
163 <listitem> 163 <listitem>
164 boolean &lt; encoded integers. 164 boolean &lt; encoded integers &lt; decimal number &lt; complex
165 </listitem>
166 <listitem>
167 boolean &lt; decimal number &lt; complex
168 </listitem> 165 </listitem>
169 <listitem>decimal number &lt; polynomial &lt; rational 166 <listitem>decimal number &lt; polynomial &lt; rational
170 <warning>booleans and polynomials are not compatible. 167 <warning>booleans and polynomials are not compatible.
@@ -184,28 +181,27 @@
184 </warning> 181 </warning>
185 </listitem> 182 </listitem>
186 <listitem> 183 <listitem>
184 Any encoded integer can be concatenated only with booleans,
185 decimal numbers, or other integers of the same inttype.
186 Thus, the expressions
187 <literal>[int8(2), uint8(7)]</literal>,
188 <literal>[int8(2), int16(7)]</literal>,
189 <literal>[int8(2), 7+0*%z]</literal>,
190 <literal>[int8(2), sparse(7)]</literal>, or
191 <literal>[int8(2), sparse(%t)]</literal>
192 will yield an error.
193 </listitem>
194 <listitem>
187 The result becomes complex-encoded as soon as a complex-encoded 195 The result becomes complex-encoded as soon as a complex-encoded
188 component -- value, polynomial, or rational -- is met in the 196 component -- value, polynomial, or rational -- is met in the
189 list (even with a null imaginary part) 197 list (even with a null imaginary part)
190 <para>Similarly, the result becomes sparse-encoded 198 <para/>
199 Similarly, the result becomes sparse-encoded
191 as soon as a sparse-encoded component is met and processed. 200 as soon as a sparse-encoded component is met and processed.
192 </para>
193 </listitem> 201 </listitem>
194 <listitem> 202 <listitem>
195 It is possible to concatenate polynomials or/and rationals 203 Concatenated polynomials or/and rationals must have the same
196 having different variable names. Then, the first polynomial 204 variable name.
197 or rational met in the list sets the variable name to the
198 concatenation result:
199 <literal>[%z, 1+%s, 1-%i*%s]
200 // => [z, 1+z, 1-iz]
201 </literal>.
202 </listitem>
203 <listitem>
204 Any encoded integer can be concatenated only with booleans or
205 with integers of the same inttype. Thus, the expressions
206 <literal>[int8(2) uint8(7)]</literal>,
207 <literal>[int8(2) int16(7)]</literal>,
208 <literal>[int8(2) 1.]</literal> will all yield an error.
209 </listitem> 205 </listitem>
210 <listitem> 206 <listitem>
211 Text components can be concatenated (in the set meaning, 207 Text components can be concatenated (in the set meaning,
@@ -263,7 +259,7 @@
263 <listitem>Recipients must be variables. 259 <listitem>Recipients must be variables.
264 Literal expressions are not accepted. 260 Literal expressions are not accepted.
265 </listitem> 261 </listitem>
266 <listitem>Variables shall be separated with comas. 262 <listitem>Variables shall be separated with commas.
267 </listitem> 263 </listitem>
268 <listitem>In a distributive assignment, there must 264 <listitem>In a distributive assignment, there must
269 be at most as many LHS recipients 265 be at most as many LHS recipients
@@ -324,20 +320,35 @@ s = poly(0,'s');[1/s,2/s]
324[tf2ss(1/s),tf2ss(2/s)] 320[tf2ss(1/s),tf2ss(2/s)]
325 321
326[%t %f %f %T %F] 322[%t %f %f %T %F]
327 323 ]]></programlisting>
328// Heterogeneous concatenations with automatical types conversions 324 <para>
325 Heterogeneous concatenations with automatical type conversions:
326 </para>
327 <programlisting role="example"><![CDATA[
329[%T int8(-5)] 328[%T int8(-5)]
330[%T %pi %f 2] 329[%T %pi %f 2]
331[%pi, 2+%i, %F] 330[%pi, 2+%i, %F]
331[%pi int16(-1000.84) 1.23]
332v = [%pi+0*%i, %F, %z, (1-%z)^2 ]; typeof(v), isreal(v) 332v = [%pi+0*%i, %F, %z, (1-%z)^2 ]; typeof(v), isreal(v)
333v = [10 1/%z], typeof(v) 333v = [10 1/%z], typeof(v)
334 334
335// Incompatible heterogeneous concatenations => ERRORS 335// Special case: int16 and uint8 together, due to initial
336// conversion to real propagating from left to right
337[%pi int16(-1000.84) uint8(87)]
338 ]]></programlisting>
339 <para>
340 Incompatible heterogeneous concatenations => ERRORS:
341 </para>
342 <programlisting role="example"><![CDATA[
336[%F %z] 343[%F %z]
337[int8(%pi) uint8(%e)] 344[%s %z]
338[int8(%pi) int16(%e)] 345[int8(-70), sparse(18)]
339[int8(%pi) %e] 346[int8(-70), sparse([%T %F])]
340 347 ]]></programlisting>
348 <para>
349 Concatenation of cells arrays:
350 </para>
351 <programlisting role="example"><![CDATA[
341// Concatenation of cells arrays: 352// Concatenation of cells arrays:
342c1 = {%pi %t}; 353c1 = {%pi %t};
343c2 = {%z "abc"}; 354c2 = {%z "abc"};
@@ -432,7 +443,7 @@ s.r([2 4 6])
432 </revdescription> 443 </revdescription>
433 </revision> 444 </revision>
434 <revision> 445 <revision>
435 <revnumber>6.1</revnumber> 446 <revnumber>6.1.0</revnumber>
436 <revdescription> 447 <revdescription>
437 <itemizedlist> 448 <itemizedlist>
438 <listitem> 449 <listitem>
@@ -445,6 +456,19 @@ s.r([2 4 6])
445 </itemizedlist> 456 </itemizedlist>
446 </revdescription> 457 </revdescription>
447 </revision> 458 </revision>
459 <revision>
460 <revnumber>6.1.1</revnumber>
461 <revdescription>
462 <itemizedlist>
463 <listitem>
464 Concatenations between encoded integers and decimal numbers are now supported.
465 </listitem>
466 <listitem>
467 Concatenated polynomials or/and rationals must have the same variable name.
468 </listitem>
469 </itemizedlist>
470 </revdescription>
471 </revision>
448 </revhistory> 472 </revhistory>
449 </refsection> 473 </refsection>
450</refentry> 474</refentry>
diff --git a/scilab/modules/core/help/en_US/2_control_flow/if.xml b/scilab/modules/core/help/en_US/2_control_flow/if.xml
index cc5d226..0c99d79 100644
--- a/scilab/modules/core/help/en_US/2_control_flow/if.xml
+++ b/scilab/modules/core/help/en_US/2_control_flow/if.xml
@@ -25,12 +25,12 @@
25 <title>Syntax</title> 25 <title>Syntax</title>
26 <synopsis> 26 <synopsis>
27 if expr1 then 27 if expr1 then
28 statements 28     statements
29 elseif expri then 29 elseif expri then
30 statements 30     statements
31 .... 31     ....
32 else 32 else
33 statements 33     statements
34 end 34 end
35 </synopsis> 35 </synopsis>
36 </refsynopsisdiv> 36 </refsynopsisdiv>
diff --git a/scilab/modules/core/help/en_US/2_control_flow/pause.xml b/scilab/modules/core/help/en_US/2_control_flow/pause.xml
index 7db3bbb..5883a24 100644
--- a/scilab/modules/core/help/en_US/2_control_flow/pause.xml
+++ b/scilab/modules/core/help/en_US/2_control_flow/pause.xml
@@ -4,6 +4,12 @@
4 <refname>pause</refname> 4 <refname>pause</refname>
5 <refpurpose>pause mode, invoke keyboard</refpurpose> 5 <refpurpose>pause mode, invoke keyboard</refpurpose>
6 </refnamediv> 6 </refnamediv>
7 <refsynopsisdiv>
8 <title>Syntax</title>
9 <synopsis>
10 pause
11 </synopsis>
12 </refsynopsisdiv>
7 <refsection> 13 <refsection>
8 <title>Description</title> 14 <title>Description</title>
9 <para> 15 <para>