Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Moin Thomas, *,
On Wed, Nov 28, 2012 at 09:24:55PM +0100, Thomas Krumbein wrote:
Am 28.11.2012 19:46, schrieb Thomas Hackert:
Hallo Christian,
Das macht keinen Unterschied - der Kommentar wird ja ignoriert.

Kann ich „return“ dann als „gibt ... aus“ übersetzen?

Ja, kannst Du. Oder einfach "ergibt".

„ergibt“ würde ich aber eher bei einer Berechnung nehmen, während hier
ja nur ein Datum ausgegeben wird, oder nicht ;?

<quote>
[..]
Sprich einmal das Datum als String, und einmal als Zahlwert.

Mal ’ne vielleicht blöde Frage: Ist das „Long“ denn jetzt ein Integer?

Nein. "Long" ist der Datentyp "long", integer ist der Datentyp "integer" ;-)

Hm. In der OLH steht als Überschrift
„[hd_id3147546]Long-Integervariablen“ (findest du im Index unter
„Variablen – Verwendung“). Ist das dann flasch ;?

Beides sind allerdings ganze Zahlen - "integer" hat einen Umfang von 2
Byte und kann daher nur Zahlen von -32.768 bis +32.768 aufnehmen, "long"
hat den Umfang von 4 Byte und und umfasst somit Zahlen von +- 2.147.483.648.
Ein aktueller Datumswert hat ungefähr die Größenordnung 41.612 - also zu
groß für eine integer-Variable.

O.K.

Und wenn ja: Warum steht das nicht als „Date-Variable“, die es laut OLH
ja auch gibt?

Die Date-Variable liefert Dir als Rückgabewert immer den schon
interpretierten Datumswert - also z.B. 28.11.2011. Die Formatierung ist
lokalisiert und intern vorgegeben, erist also unflexibler. Intern wird
dennoch der Zahlenwert gespeichert. Insofern nutzt man eher eine
Longvariable und gibt das Datum bei Bedarf formatiert aus - z.B.

msgbox format(ldate, "dd. mmmm yyyy") 'ergibt 28. November 2012

O.K.
Danke für deine Erläuterung und bis dann
Thomas.

-- 
BOFH excuse #101:
Collapsed Backbone

-- 
Informationen zum Abmelden: E-Mail an discuss+help@de.libreoffice.org
Probleme? http://de.libreoffice.org/hilfe-kontakt/mailing-listen/abmeldung-liste/
Tipps zu Listenmails: http://wiki.documentfoundation.org/Netiquette/de
Listenarchiv: http://listarchives.libreoffice.org/de/discuss/
Alle E-Mails an diese Liste werden unlöschbar öffentlich archiviert

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.