5 messages in org.openoffice.fr.progRe: [prog] Bug avec "dim preserve" da...
FromSent OnAttachments
FabienOct 16, 2008 3:45 pm 
FabienOct 16, 2008 11:09 pm 
FabienOct 16, 2008 11:41 pm 
Francois GattoOct 16, 2008 11:47 pm 
FabienOct 17, 2008 1:57 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [prog] Bug avec "dim preserve" dans OOo3Actions...
From:Fabien (fabs@wanadoo.fr)
Date:Oct 16, 2008 11:09:08 pm
List:org.openoffice.fr.prog

Rebonjour,

Pire: on ne peut plus affecter de valeur à une variable après une redimension.

Exemple:

Sub test dim st(2) as string st=array("a","b","c") ReDim preserve st(1) st(0) = "a" print st(0) print typeName(st) end sub

Le premier print ne me renvoie rien, le deuxième "Empty()"

Par contre, si je n'affecte pas de valeur à ma variable avant de redimensionner, ça marche.

Exemple; ceci marche:

Sub test dim st(2) as string ReDim preserve st(1) st(0) = "a" print st(0) print typeName(st) end sub

On obtient bien "a" et "String()"

Le bug me parait tout de même important.