Comment traduire ça en pb ?
Code : Tout sélectionner
A.d = 10.0
B.d=15.0
flag.d=1.0
A = A + flag*(double)(int)(B /15.0+0.5)/24.0
Debug A
Debug StrD(A)
M.
Code : Tout sélectionner
A.d = 10.0
B.d=15.0
flag.d=1.0
A = A + flag*(double)(int)(B /15.0+0.5)/24.0
Debug A
Debug StrD(A)
Code : Tout sélectionner
A = A + flag*(double)(int)(B /15.0+0.5)/24.0
Code : Tout sélectionner
A = A + flag * int(B /15.0+0.5) / 24.0
majikeyric a écrit :A ce sujet, j'ai passé ces derniers jours à étudier le code source de compilateurs C pour trouver des pistes pour créer un convertisseur C (ainsi) vers PB.
Mais ça demande un boulot énorme et je suis pas sure d'arriver au bout alors
J'ai vu sur le forum un post (de 2004) http://www.purebasic.fr/french/viewtopic.php?f=4&t=452
d'un début de projet de convertisseur, mais la méthode laissait à désirer... et le projet s'est arrété rapidement.
Code : Tout sélectionner
struct
{
float a;
}foo;
foo A;
foo & foo_a()
{
return A;
}
foo * foo_B()
{
return &A;
}
Code : Tout sélectionner
foo & foo_a()
{
return A;
}
Code : Tout sélectionner
Structure maStruct
A.l
EndStructure
Global myVar.maStruct
Procedure.maStruct foo()
myVar\A = 55
procedurereturn myVar
EndProcedure
myOtherVar.maStruct = foo()