From 4b1a9203c547c019fc5398082ae19a3f3d4c3efe Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:41:15 -0500 Subject: initial commit --- .../global_objects/dataview/getfloat32/index.html | 122 +++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 files/ca/web/javascript/reference/global_objects/dataview/getfloat32/index.html (limited to 'files/ca/web/javascript/reference/global_objects/dataview/getfloat32') diff --git a/files/ca/web/javascript/reference/global_objects/dataview/getfloat32/index.html b/files/ca/web/javascript/reference/global_objects/dataview/getfloat32/index.html new file mode 100644 index 0000000000..83de1562e4 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/dataview/getfloat32/index.html @@ -0,0 +1,122 @@ +--- +title: DataView.prototype.getFloat32() +slug: Web/JavaScript/Reference/Global_Objects/DataView/getFloat32 +translation_of: Web/JavaScript/Reference/Global_Objects/DataView/getFloat32 +--- +
{{JSRef}}
+ +

El mètode getFloat32() obtè un nombre decimal en coma flotant amb signe de 32 bits (float) a la posició en bytes especificada, content des del començament de {{jsxref("DataView")}}.

+ +

Sintaxi

+ +
dataview.getFloat32(byteOffset [, littleEndian])
+ +

Paràmetres

+ +
+
byteOffset
+
La posició, en bytes, des de l'inici de la vista a la que es llegiran les dades.
+
littleEndian
+
{{optional_inline}} Indica si el nombre decimal en coma flotant de 32 bits es troba emmagatzemat en format {{Glossary("Endianness", "little- o big-endian")}}. De ésser false o undefined, s'interpreta el valor com a big-endian.
+
+ +

Errors llençats

+ +
+
{{jsxref("RangeError")}}
+
Es llença si byteOffset té un valor que representa una posició més enllà del final de la vista.
+
+ +

Descripció

+ +

No hi ha cap restricció d'alineament; es poden llegir valors de múltiples bytes des de qualsevol posició.

+ +

Exemples

+ +

Utilitzar el mètode getFloat32

+ +
var buffer = new ArrayBuffer(8);
+var dataview = new DataView(buffer);
+dataview.getFloat32(1); // 0
+
+ +

Especificacions

+ + + + + + + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('Typed Array')}}{{Spec2('Typed Array')}}Reemplaçada per ECMAScript 6.
{{SpecName('ES6', '#sec-dataview.prototype.getfloat32', 'DataView.prototype.getFloat32')}}{{Spec2('ES6')}}Definició inicial en un estàndard ECMA.
+ +

Compatibilitat amb navegadors

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic9.0{{CompatGeckoDesktop("15.0")}}1012.15.1
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome per AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic4.0{{CompatVersionUnknown}}{{ CompatGeckoMobile("15") }}{{CompatUnknown}}12.04.2
+
+ +

Vegeu també

+ + -- cgit v1.2.3-54-g00ecf