8 messages in org.openoffice.fr.progRe: [prog] problème de 0
FromSent OnAttachments
Sebastien RemyJun 19, 2006 7:00 am 
Laurent GodardJun 19, 2006 7:12 am 
Alex ThurgoodJun 19, 2006 9:10 am 
Laurent GodardJun 19, 2006 9:34 am 
Bernard MarcellyJun 19, 2006 9:48 am 
Laurent GodardJun 19, 2006 10:03 am 
Alex ThurgoodJun 19, 2006 1:37 pm 
Bernard MarcellyJun 19, 2006 2:08 pm 
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] problème de 0Actions...
From:Bernard Marcelly (marc@club-internet.fr)
Date:Jun 19, 2006 9:48:43 am
List:org.openoffice.fr.prog

Bonjour Alex Thurgood Message du 2006-06-19 18:10:

Laurent Godard wrote:

dim debut as double

debut = 0105 print 2006 &debuttrim 'réponse : 2006105

si tu veux garder debut as double print "2006" & Cstr(debut)

sinon, voir la fonction format pour plus de possibilités

Sur PC-BSD avec OOo2.0.2rc4, ça ne fonctionne pas, il renvoit toujours 2006105

Ben oui, 0105 interprété en nombre, c'est 105. Et la variable debut, de type Double, enregistre donc le nombre 105. Ensuite une conversion ordinaire de ce nombre en texte donne : "105". Ne pas confondre le nombre et sa représentation.

dim debut as double

debut = 105 print 2006 & format(debut, "0000")

Bernard