adding count2
This commit is contained in:
@@ -11,15 +11,15 @@ defineProps<{ word?: boolean }>();
|
|||||||
<svg
|
<svg
|
||||||
class="logo"
|
class="logo"
|
||||||
:class="{ 'has-word': word }"
|
:class="{ 'has-word': word }"
|
||||||
:viewBox="word ? '64 62 322 206' : '64 64 322 142'"
|
:viewBox="word ? '64 62 270 206' : '64 64 270 142'"
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
role="img"
|
role="img"
|
||||||
aria-label="Numolus"
|
aria-label="Numolus"
|
||||||
>
|
>
|
||||||
<g stroke="var(--logo-keyline, #111)" stroke-width="6">
|
<g stroke="var(--logo-keyline, #111)" stroke-width="6">
|
||||||
<rect x="70" y="70" width="130" height="130" fill="#FFD400" />
|
<rect x="70" y="100" width="40" height="90" style="fill:rgb(255,212,0);"/>
|
||||||
<rect x="160" y="70" width="130" height="130" fill="#0057FF" />
|
<rect x="115" y="100" width="65" height="90" style="fill:rgb(0,87,255);"/>
|
||||||
<rect x="250" y="70" width="130" height="130" fill="#E8384F" />
|
<rect x="185" y="100" width="130" height="90" style="fill:rgb(232,56,79);"/>
|
||||||
</g>
|
</g>
|
||||||
<text
|
<text
|
||||||
v-if="word"
|
v-if="word"
|
||||||
|
|||||||
@@ -52,6 +52,10 @@ export const FUNCTIONS: Record<string, FunctionFn> = {
|
|||||||
return nums(values).length;
|
return nums(values).length;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
COUNT2(values) {
|
||||||
|
return values.length;
|
||||||
|
},
|
||||||
|
|
||||||
// IF(cond; then; else?) -- evaluator.ts special-cases this name *before*
|
// IF(cond; then; else?) -- evaluator.ts special-cases this name *before*
|
||||||
// ever reaching FUNCTIONS, giving it real short-circuit evaluation (only
|
// ever reaching FUNCTIONS, giving it real short-circuit evaluation (only
|
||||||
// the taken branch is computed, so e.g. IF(B1=0; 0; A1/B1) never runs the
|
// the taken branch is computed, so e.g. IF(B1=0; 0; A1/B1) never runs the
|
||||||
@@ -152,6 +156,7 @@ export const BUILTIN_SIGNATURES: ReadonlyArray<{ name: string; hint: string }> =
|
|||||||
{ name: 'MIN', hint: 'MIN(Zahl1; Zahl2; …)' },
|
{ name: 'MIN', hint: 'MIN(Zahl1; Zahl2; …)' },
|
||||||
{ name: 'MAX', hint: 'MAX(Zahl1; Zahl2; …)' },
|
{ name: 'MAX', hint: 'MAX(Zahl1; Zahl2; …)' },
|
||||||
{ name: 'COUNT', hint: 'COUNT(Zahl1; Zahl2; …)' },
|
{ name: 'COUNT', hint: 'COUNT(Zahl1; Zahl2; …)' },
|
||||||
|
{ name: 'COUNT2', hint: 'COUNT(Text1; Zahl2; …)' },
|
||||||
{ name: 'IF', hint: 'IF(Bedingung; Dann; Sonst?)' },
|
{ name: 'IF', hint: 'IF(Bedingung; Dann; Sonst?)' },
|
||||||
{ name: 'DATE', hint: 'DATE(Jahr; Monat; Tag)' },
|
{ name: 'DATE', hint: 'DATE(Jahr; Monat; Tag)' },
|
||||||
{ name: 'TIME', hint: 'TIME(Std; Min; Sek)' },
|
{ name: 'TIME', hint: 'TIME(Std; Min; Sek)' },
|
||||||
|
|||||||
Reference in New Issue
Block a user