From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../vbarray/dimensions/index.html | 80 +++++++++++++++ .../vbarray/getitem/index.html | 89 +++++++++++++++++ .../extensions_microsoft/vbarray/index.html | 108 +++++++++++++++++++++ .../extensions_microsoft/vbarray/lbound/index.html | 91 +++++++++++++++++ .../vbarray/toarray/index.html | 84 ++++++++++++++++ .../extensions_microsoft/vbarray/ubound/index.html | 91 +++++++++++++++++ 6 files changed, 543 insertions(+) create mode 100644 files/fr/archive/web/javascript/extensions_microsoft/vbarray/dimensions/index.html create mode 100644 files/fr/archive/web/javascript/extensions_microsoft/vbarray/getitem/index.html create mode 100644 files/fr/archive/web/javascript/extensions_microsoft/vbarray/index.html create mode 100644 files/fr/archive/web/javascript/extensions_microsoft/vbarray/lbound/index.html create mode 100644 files/fr/archive/web/javascript/extensions_microsoft/vbarray/toarray/index.html create mode 100644 files/fr/archive/web/javascript/extensions_microsoft/vbarray/ubound/index.html (limited to 'files/fr/archive/web/javascript/extensions_microsoft/vbarray') diff --git a/files/fr/archive/web/javascript/extensions_microsoft/vbarray/dimensions/index.html b/files/fr/archive/web/javascript/extensions_microsoft/vbarray/dimensions/index.html new file mode 100644 index 0000000000..f2d0731ed5 --- /dev/null +++ b/files/fr/archive/web/javascript/extensions_microsoft/vbarray/dimensions/index.html @@ -0,0 +1,80 @@ +--- +title: VBArray.dimensions +slug: Archive/Web/JavaScript/Extensions_Microsoft/VBArray/dimensions +tags: + - JavaScript + - Méthode + - Non-standard + - Reference +translation_of: Archive/Web/JavaScript/Microsoft_Extensions/VBArray/dimensions +--- +
{{JSRef}}{{Non-standard_header}}
+ +
Attention ! Cette méthode est spécifique à Microsoft et ne fonctionne qu'avec Internet Explorer.
+ +

La méthode VBArray.dimensions() renvoie le nombre de dimensions d'un objet {{jsxref("VBArray")}}.

+ +

Syntaxe

+ +
monVBArray.dimensions()
+ +

Exemples

+ +
<head>
+  <script type="text/vbscript">
+  <!--
+  Function CreateVBArray()
+     Dim i, j, k
+     Dim a(2, 2)
+     k = 1
+     For i = 0 To 2
+        For j = 0 To 2
+           a(j, i) = k
+           document.writeln(k)
+           k = k + 1
+        Next
+        document.writeln("<br />")
+     Next
+     CreateVBArray = a
+  End Function
+  -->
+  </script>
+
+  <script type="text/javascript">
+  <!--
+  function VBArrayTest(vbarray) {
+     var a = new VBArray(vbarray);
+     var b = a.toArray();
+     var s = "";
+     for (i = 1; i <= a.dimensions() ; i++) {
+       s += "La borne supérieure de la dimension " + i ";
+       s += " est " + a.ubound(i) + ".";
+     }
+     return s;
+  }
+  -->
+  </script>
+</head>
+
+<body>
+  <script type="text/javascript">
+    <!--
+    VBArrayTest(CreateVBArray());
+    -->
+  </script>
+</body>
+ +

Prérequis

+ +

Cette fonctionnalité est prise en charge par les modes suivants : Quirks, Internet Explorer 6 en mode standard, Internet Explorer 7 en mode standard, Internet Explorer 8 en mode standard, Internet Explorer 9 en mode standard et Internet Explorer 10 en mode standard. Elle n'est pas prise en charge par les applications Windows 8.x Store.

+ +

Voir aussi

+ + diff --git a/files/fr/archive/web/javascript/extensions_microsoft/vbarray/getitem/index.html b/files/fr/archive/web/javascript/extensions_microsoft/vbarray/getitem/index.html new file mode 100644 index 0000000000..0c4eec42c3 --- /dev/null +++ b/files/fr/archive/web/javascript/extensions_microsoft/vbarray/getitem/index.html @@ -0,0 +1,89 @@ +--- +title: VBArray.getItem +slug: Archive/Web/JavaScript/Extensions_Microsoft/VBArray/getItem +tags: + - JavaScript + - Méthode + - Non-standard + - Reference +translation_of: Archive/Web/JavaScript/Microsoft_Extensions/VBArray/getItem +--- +
{{JSRef}}{{Non-standard_header}}
+ +
Attention ! Cette méthode est spécifique à Microsoft et ne fonctionne qu'avec Internet Explorer.
+ +

La méthode VBArray.getItem() l'élément du tableau {{jsxref("VBArray")}} courant à l'emplacement indiqué.

+ +

Syntaxe

+ +
monVBArray.getItem(dimension1[, dimension2[, ... [, dimensionN]]])
+ +

Paramètres

+ +
+
dimension1-dimensionN
+
Les coordonnées exactes de la valeur qu'on souhaite récupérer dans le tableau VBArray. La valeur n correspond au nombre de dimensions du tableau.
+
+ +

Valeur de retour

+ +

La valeur de l'objet située aux coordonnées dimension1-dimension2-…-dimensionN dans le tableau VBArray.

+ +

Exemples

+ +
<head>
+  <script type="text/vbscript">
+  <!--
+  Function CreateVBArray()
+     Dim i, j, k
+     Dim a(2, 2)
+     k = 1
+     For i = 0 To 2
+        For j = 0 To 2
+           a(j, i) = k
+           document.writeln(k)
+           k = k + 1
+        Next
+        document.writeln("<br />")
+     Next
+     CreateVBArray = a
+  End Function
+  -->
+  </script>
+
+  <script type="text/javascript">
+  <!--
+  function GetItemTest(vbarray) {
+     var i, j;
+     var a = new VBArray(vbarray);
+     for (i = 1; i <= 2 ; i++) {
+       for (j = 1; j <= 2 ; j++) {
+         console.log(a.getItem(i,j));
+     }
+  }
+  -->
+  </script>
+</head>
+
+<body>
+  <script type="text/javascript">
+    <!--
+    GetItemTest(CreateVBArray());
+    -->
+  </script>
+</body>
+ +

Prérequis

+ +

Cette fonctionnalité est prise en charge par les modes suivants : Quirks, Internet Explorer 6 en mode standard, Internet Explorer 7 en mode standard, Internet Explorer 8 en mode standard, Internet Explorer 9 en mode standard et Internet Explorer 10 en mode standard. Elle n'est pas prise en charge par les applications Windows 8.x Store.

+ +

Voir aussi

+ + diff --git a/files/fr/archive/web/javascript/extensions_microsoft/vbarray/index.html b/files/fr/archive/web/javascript/extensions_microsoft/vbarray/index.html new file mode 100644 index 0000000000..0b823f10f4 --- /dev/null +++ b/files/fr/archive/web/javascript/extensions_microsoft/vbarray/index.html @@ -0,0 +1,108 @@ +--- +title: VBArray +slug: Archive/Web/JavaScript/Extensions_Microsoft/VBArray +tags: + - JavaScript + - Microsoft + - Non-standard + - Reference + - VBArray +translation_of: Archive/Web/JavaScript/Microsoft_Extensions/VBArray +--- +
{{JSRef}}{{Non-standard_header}}
+ +
Attention ! Cet objet est spécifique à Microsoft et est uniquement pris en charge par Internet Explorer.
+ +

L'objet VBArray permet d'accéder à des tableaux Visual Basic.

+ +

Syntaxe

+ +
varName = new VBArray(safeArray);
+ +

Paramètres

+ +
+
safeArray
+
Une valeur VBArray.
+
+ +

Notes

+ +

Les tableaux VBArray sont uniquement accessibles en lecture seule et ne peuvent pas être créés directement. L'argument safeArray doit être une valeur VBArray valide. L'obtention d'une telle valeur ne peut se faire que via un contrôle ActiveX ou via un autre objet.

+ +

Les tableaux VBArray peuvent avoir plusieurs dimensions, dont chacune a un ensemble d'indices différents.

+ +

Exemples

+ +

The following example consists of three parts. The first part is VBScript code to create a Visual Basic safe array. The second part is JavaScript code that converts the Visual Basic safe array to a JavaScript array. Both of these parts go into the <HEAD> section of an HTML page. The third part is the JavaScript code that goes in the <BODY> section to run the other two parts.

+ +
<head>
+  <script type="text/vbscript">
+  <!--
+  Function CreateVBArray()
+     Dim i, j, k
+     Dim a(2, 2)
+     k = 1
+     For i = 0 To 2
+        For j = 0 To 2
+           a(j, i) = k
+           document.writeln(k)
+           k = k + 1
+        Next
+        document.writeln("<br />")
+     Next
+     CreateVBArray = a
+  End Function
+  -->
+  </script>
+
+  <script type="text/javascript">
+  <!--
+  function VBArrayTest(vbarray) {
+     var a = new VBArray(vbarray);
+     var b = a.toArray();
+     var i;
+     for (i = 0; i < 9; i++) {
+       console.log(b[i]);
+     }
+  }
+  -->
+  </script>
+</head>
+
+<body>
+  <script type="text/javascript">
+    <!--
+    VBArrayTest(CreateVBArray());
+    -->
+  </script>
+</body>
+ +

Propriétés

+ +

L'objet VBArray ne possède aucune propriété.

+ +

Méthodes

+ +
+
VBArray.dimensions()
+
Cette méthode renvoie le nombre de dimensions du tableau VBArray.
+
VBArray.getItem()
+
Cette méthode renvoie l'élément à l'emplacement indiqué.
+
VBArray.lbound()
+
Cette méthode renvoie l'indice le plus bas du VBArray pour la dimension indiquée.
+
VBArray.toArray()
+
Cette méthode renvoie un tableau JavaScript standard converti à partir de l'objet VBArray.
+
VBArray.ubound()
+
Cette méthode renvoie l'indice le plus haut du VBArray pour la dimension indiquée.
+
+ +

Prérequis

+ +

Cette fonctionnalité est prise en charge par les modes suivants : Quirks, Internet Explorer 6 en mode standard, Internet Explorer 7 en mode standard, Internet Explorer 8 en mode standard, Internet Explorer 9 en mode standard et Internet Explorer 10 en mode standard. Elle n'est pas prise en charge par les applications Windows 8.x Store.

+ +

Voir aussi

+ + diff --git a/files/fr/archive/web/javascript/extensions_microsoft/vbarray/lbound/index.html b/files/fr/archive/web/javascript/extensions_microsoft/vbarray/lbound/index.html new file mode 100644 index 0000000000..4fa681822b --- /dev/null +++ b/files/fr/archive/web/javascript/extensions_microsoft/vbarray/lbound/index.html @@ -0,0 +1,91 @@ +--- +title: VBArray.lbound +slug: Archive/Web/JavaScript/Extensions_Microsoft/VBArray/lbound +tags: + - JavaScript + - Méthode + - Non-standard + - Reference +translation_of: Archive/Web/JavaScript/Microsoft_Extensions/VBArray/lbound +--- +
{{JSRef}}{{Non-standard_header}}
+ +
Attention ! Cette méthode est spécifique à Microsoft et ne fonctionne qu'avec Internet Explorer.
+ +

La méthode VBArray.lbound() renvoie l'indice le plus bas de l'objet {{jsxref("VBArray")}} pour la dimension indiquée.

+ +

Syntaxe

+ +
monVBArray.lbound(dimension)
+ +

Paramètres

+ +
+
dimension {{optional_inline}}
+
La dimension pour laquelle on veut l'indice le plus bas. La valeur par défaut est 1.
+
+ +

Valeur de retour

+ +

Si le tableau est vide, {{jsxref("undefined")}}, sinon l'indice le plus bas pour la dimension souhaitée. Si la valeur de dimension excède le nombre de dimensions du tableau VBArray, une erreur "Subscript out of range" est levée.

+ +

Exemples

+ +
<head>
+  <script type="text/vbscript">
+  <!--
+  Function CreateVBArray()
+     Dim i, j, k
+     Dim a(2, 2)
+     k = 1
+     For i = 0 To 2
+        For j = 0 To 2
+           a(j, i) = k
+           document.writeln(k)
+           k = k + 1
+        Next
+        document.writeln("<br />")
+     Next
+     CreateVBArray = a
+  End Function
+  -->
+  </script>
+
+  <script type="text/javascript">
+  <!--
+  function VBArrayTest(vbarray) {
+     var a = new VBArray(vbarray);
+     var b = a.toArray();
+     var s = "";
+     for (i = 1; i <= a.dimensions() ; i++) {
+       s += "La borne inférieure de la dimension " + i ";
+       s += " est " + a.lbound(i) + ".";
+     }
+     return s;
+  }
+  -->
+  </script>
+</head>
+
+<body>
+  <script type="text/javascript">
+    <!--
+    VBArrayTest(CreateVBArray());
+    -->
+  </script>
+</body>
+ +

Prérequis

+ +

Cette fonctionnalité est prise en charge par les modes suivants : Quirks, Internet Explorer 6 en mode standard, Internet Explorer 7 en mode standard, Internet Explorer 8 en mode standard, Internet Explorer 9 en mode standard et Internet Explorer 10 en mode standard. Elle n'est pas prise en charge par les applications Windows 8.x Store.

+ +

Voir aussi

+ + diff --git a/files/fr/archive/web/javascript/extensions_microsoft/vbarray/toarray/index.html b/files/fr/archive/web/javascript/extensions_microsoft/vbarray/toarray/index.html new file mode 100644 index 0000000000..377b5ba29f --- /dev/null +++ b/files/fr/archive/web/javascript/extensions_microsoft/vbarray/toarray/index.html @@ -0,0 +1,84 @@ +--- +title: VBArray.toArray +slug: Archive/Web/JavaScript/Extensions_Microsoft/VBArray/toArray +tags: + - JavaScript + - Méthode + - Non-standard + - Reference +translation_of: Archive/Web/JavaScript/Microsoft_Extensions/VBArray/toArray +--- +
{{JSRef}}{{Non-standard_header}}
+ +
Attention ! Cette méthode est spécifique à Microsoft et ne fonctionne qu'avec Internet Explorer.
+ +

La méthode VBArray.toArray() renvoie un tableau JavaScript {{jsxref("Array")}} à partir d'une valeur {{jsxref("VBArray")}}.

+ +

Syntaxe

+ +
monVBArray.toArray()
+ +

Valeur de retour

+ +

La valeur VBArray convertie en {{jsxref("Array")}}. Un tableau VBArray étant multi-dimensionnel, il est aplati avec les tableaux des dimensions les uns à la suite des autres. Ainsi, si le tableau VBArray contient [1,2,3][4,5,6][7,8,9], il sera converti en un tableau Array ayant la structure [1,2,3,4,5,6,7,8,9].

+ +

Il n'existe aucune méthode qui permette de convertir un tableau {{jsxref("Array")}} en {{jsxref("VBArray")}}.

+ +

Exemples

+ +
<head>
+  <script type="text/vbscript">
+  <!--
+  Function CreateVBArray()
+     Dim i, j, k
+     Dim a(2, 2)
+     k = 1
+     For i = 0 To 2
+        For j = 0 To 2
+           a(j, i) = k
+           document.writeln(k)
+           k = k + 1
+        Next
+        document.writeln("<br />")
+     Next
+     CreateVBArray = a
+  End Function
+  -->
+  </script>
+
+  <script type="text/javascript">
+  <!--
+  function VBArrayTest(vbarray) {
+     var a = new VBArray(vbarray);
+     var b = a.toArray();
+     var s = "";
+     for (i = 0; i < 9 ; i++) {
+       console.log(b[i]);
+     }
+  }
+  -->
+  </script>
+</head>
+
+<body>
+  <script type="text/javascript">
+    <!--
+    VBArrayTest(CreateVBArray());
+    -->
+  </script>
+</body>
+ +

Prérequis

+ +

Cette fonctionnalité est prise en charge par les modes suivants : Quirks, Internet Explorer 6 en mode standard, Internet Explorer 7 en mode standard, Internet Explorer 8 en mode standard, Internet Explorer 9 en mode standard et Internet Explorer 10 en mode standard. Elle n'est pas prise en charge par les applications Windows 8.x Store.

+ +

Voir aussi

+ + diff --git a/files/fr/archive/web/javascript/extensions_microsoft/vbarray/ubound/index.html b/files/fr/archive/web/javascript/extensions_microsoft/vbarray/ubound/index.html new file mode 100644 index 0000000000..9bfb404248 --- /dev/null +++ b/files/fr/archive/web/javascript/extensions_microsoft/vbarray/ubound/index.html @@ -0,0 +1,91 @@ +--- +title: VBArray.ubound +slug: Archive/Web/JavaScript/Extensions_Microsoft/VBArray/ubound +tags: + - JavaScript + - Méthode + - Non-standard + - Reference +translation_of: Archive/Web/JavaScript/Microsoft_Extensions/VBArray/ubound +--- +
{{JSRef}}{{Non-standard_header}}
+ +
Attention ! Cette méthode est spécifique à Microsoft et ne fonctionne qu'avec Internet Explorer.
+ +

La méthode VBArray.ubound() renvoie l'indice le plus haut de l'objet {{jsxref("VBArray")}} pour la dimension indiquée.

+ +

Syntaxe

+ +
monVBArray.ubound(dimension)
+ +

Paramètres

+ +
+
dimension {{optional_inline}}
+
La dimension pour laquelle on veut l'indice le plus haut. La valeur par défaut est 1.
+
+ +

Valeur de retour

+ +

Si le tableau est vide, {{jsxref("undefined")}}, sinon l'indice le plus haut pour la dimension souhaitée. Si la valeur de dimension excède le nombre de dimensions du tableau VBArray, une erreur "Subscript out of range" est levée.

+ +

Exemples

+ +
<head>
+  <script type="text/vbscript">
+  <!--
+  Function CreateVBArray()
+     Dim i, j, k
+     Dim a(2, 2)
+     k = 1
+     For i = 0 To 2
+        For j = 0 To 2
+           a(j, i) = k
+           document.writeln(k)
+           k = k + 1
+        Next
+        document.writeln("<br />")
+     Next
+     CreateVBArray = a
+  End Function
+  -->
+  </script>
+
+  <script type="text/javascript">
+  <!--
+  function VBArrayTest(vbarray) {
+     var a = new VBArray(vbarray);
+     var b = a.toArray();
+     var s = "";
+     for (i = 1; i <= a.dimensions() ; i++) {
+       s += "La borne supérieure de la dimension " + i ";
+       s += " est " + a.ubound(i) + ".";
+     }
+     return s;
+  }
+  -->
+  </script>
+</head>
+
+<body>
+  <script type="text/javascript">
+    <!--
+    VBArrayTest(CreateVBArray());
+    -->
+  </script>
+</body>
+ +

Prérequis

+ +

Cette fonctionnalité est prise en charge par les modes suivants : Quirks, Internet Explorer 6 en mode standard, Internet Explorer 7 en mode standard, Internet Explorer 8 en mode standard, Internet Explorer 9 en mode standard et Internet Explorer 10 en mode standard. Elle n'est pas prise en charge par les applications Windows 8.x Store.

+ +

Voir aussi

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