Difference between revisions of "Calc/Funkcionalnosti/Matrične konstante v formulah"

From Apache OpenOffice Wiki
Jump to: navigation, search
Line 1: Line 1:
 
{{DISPLAYTITLE:Matrične konstante v formulah}}
 
{{DISPLAYTITLE:Matrične konstante v formulah}}
Array constants are implemented with [http://www.openoffice.org/issues/show_bug.cgi?id=32342 i32342] in [http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=SRC680%2Fjgarrays CWS jgarrays]
+
Matrične konstante so implementirane z [http://www.openoffice.org/issues/show_bug.cgi?id=32342 zadevo 32342] v [http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=SRC680%2Fjgarrays CWS jgarrays]
  
 
== Opis ==
 
== Opis ==
  
Calc now supports inline matrix/array constants in formulas. An inline
+
Calc zdaj v formulah podpira inline matrix/array constants. An inline array is surrounded by curly braces '{' and '}'. Elements can be each a number (including negatives), a logical constant (TRUE, FALSE) or a literal string. Non-constant expressions are not allowed. Arrays can be entered with one or more rows, and one or more columns. All rows must consist of the same number of elements, all columns must consist of the same number of elements, so that a two-dimensional array has no sparse elements. The column separator (separating elements in one row) is the ';' semicolon, the row separator is a '|' pipe symbol. They were chosen because the upcoming ODF formula specification uses these separators. Contrary to Excel, the separators are not UI-version and/or locale dependent. Arrays can not be nested. Import/export from/to Excel are implemented.
array is surrounded by curly braces '{' and '}'. Elements can be each
+
a number (including negatives), a logical constant (TRUE, FALSE) or a
+
literal string. Non-constant expressions are not allowed. Arrays can
+
be entered with one or more rows, and one or more columns. All rows
+
must consist of the same number of elements, all columns must consist
+
of the same number of elements, so that a two-dimensional array has no
+
sparse elements. The column separator (separating elements in one row)
+
is the ';' semicolon, the row separator is a '|' pipe symbol. They
+
were chosen because the upcoming ODF formula specification uses these
+
separators. Contrary to Excel, the separators are not UI-version
+
and/or locale dependent. Arrays can not be nested. Import/export
+
from/to Excel are implemented.
+
  
 
== Primeri ==
 
== Primeri ==
  
; ={1;2;3} : An array with one row consisting of the three numbers 1, 2 and 3.
+
; ={1;2;3} : Matrika z eno vrstico, ki jo sestavljajo številke 1, 2 in 3.
  
; ={1;2;3|4;5;6} : An array with two rows and three values in each row.
+
; ={1;2;3|4;5;6} : Matrika z dvema vrsticama in tremi vrednostmi v vsaki vrstici.
  
; ={0;1;2|FALSE;TRUE;"two"} : A mixed data array.
+
; ={0;1;2|FALSE;TRUE;"two"} : Matrika z mešanimi podatki.
  
; =SIN({1;2;3}) : Entered as a matrix formula delivers the result of three SIN calculations with the arguments 1, 2 respectively three.
+
; =SIN({1;2;3}) : Če jo vnesemo kot matrično formulo, vrne rezultat treh izračunov SIN z argumenti 1, 2 in 3.
  
; ={1;2|4;5;6} : Invalid array, the first row misses an element. This results in Err:512 "Formula overflow".
+
; ={1;2|4;5;6} : Neveljavna matrika, prvi vrstici manjka en element. To vrne napako Err:512 "Formula overflow".
  
; ={1;2+3} : Invalid array, the second element is not a constant. This results in Err:512 "Formula overflow".
+
; ={1;2+3} : Neveljavna matrika, drugi element ni konstanta. To vrne napako Err:512 "Formula overflow".
  
; ={1;2;{3;4;5}} : Invalid array, nested arrays are not allowed. This results in Err:533 "Nested arrays are not supported". This is a new error condition relevant for translation.
+
; ={1;2;{3;4;5}} : Neveljavna matrika, ugnezdene matrike niso dovoljene. To vrne napako Err:533 "Ugnezdene matrike niso podprte". To je novo sporočilo napake, namenjeno tudi prevajanju v druge jezike.
  
 
[[Category:Calc po slovensko|Funkcionalnosti/Matrične konstante v formulah]]
 
[[Category:Calc po slovensko|Funkcionalnosti/Matrične konstante v formulah]]
 
[[Category:Funkcionalnosti|Matrika]]
 
[[Category:Funkcionalnosti|Matrika]]

Revision as of 12:08, 23 July 2008

Matrične konstante so implementirane z zadevo 32342 v CWS jgarrays

Opis

Calc zdaj v formulah podpira inline matrix/array constants. An inline array is surrounded by curly braces '{' and '}'. Elements can be each a number (including negatives), a logical constant (TRUE, FALSE) or a literal string. Non-constant expressions are not allowed. Arrays can be entered with one or more rows, and one or more columns. All rows must consist of the same number of elements, all columns must consist of the same number of elements, so that a two-dimensional array has no sparse elements. The column separator (separating elements in one row) is the ';' semicolon, the row separator is a '|' pipe symbol. They were chosen because the upcoming ODF formula specification uses these separators. Contrary to Excel, the separators are not UI-version and/or locale dependent. Arrays can not be nested. Import/export from/to Excel are implemented.

Primeri

={1;2;3} 
Matrika z eno vrstico, ki jo sestavljajo številke 1, 2 in 3.
={1;2;3|4;5;6} 
Matrika z dvema vrsticama in tremi vrednostmi v vsaki vrstici.
={0;1;2|FALSE;TRUE;"two"} 
Matrika z mešanimi podatki.
=SIN({1;2;3}) 
Če jo vnesemo kot matrično formulo, vrne rezultat treh izračunov SIN z argumenti 1, 2 in 3.
={1;2|4;5;6} 
Neveljavna matrika, prvi vrstici manjka en element. To vrne napako Err:512 "Formula overflow".
={1;2+3} 
Neveljavna matrika, drugi element ni konstanta. To vrne napako Err:512 "Formula overflow".
={1;2;{3;4;5}} 
Neveljavna matrika, ugnezdene matrike niso dovoljene. To vrne napako Err:533 "Ugnezdene matrike niso podprte". To je novo sporočilo napake, namenjeno tudi prevajanju v druge jezike.
Personal tools