FORUM DE DISCUSSION SUR LE LANGAGE PANORAMIC
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.
FORUM DE DISCUSSION SUR LE LANGAGE PANORAMIC

Développement d'applications avec le langage Panoramic
 
AccueilAccueil  RechercherRechercher  Dernières imagesDernières images  S'enregistrerS'enregistrer  MembresMembres  Connexion  
Derniers sujets
» Bataille navale SM
mon evaluateur edf Emptypar jjn4 Aujourd'hui à 17:39

» Une calculatrice en une ligne de programme
mon evaluateur edf Emptypar jean_debord Aujourd'hui à 8:01

» Gestion d'un système client-serveur.
mon evaluateur edf Emptypar Pedro Hier à 19:31

» Les maths du crocodile
mon evaluateur edf Emptypar jean_debord Hier à 10:37

» Naissance de Crocodile Basic
mon evaluateur edf Emptypar jean_debord Hier à 8:45

» Editeur EliP 6 : Le Tiny éditeur avec 25 onglets de travail
mon evaluateur edf Emptypar Froggy One Mer 24 Avr 2024 - 18:38

» Dessine-moi une galaxie
mon evaluateur edf Emptypar jjn4 Lun 22 Avr 2024 - 13:47

» Erreur END_SUB
mon evaluateur edf Emptypar jjn4 Lun 22 Avr 2024 - 13:43

» Bug sur DIM_LOCAL ?
mon evaluateur edf Emptypar papydall Dim 21 Avr 2024 - 23:30

» Form
mon evaluateur edf Emptypar leclode Dim 21 Avr 2024 - 18:09

» trop de fichiers en cours
mon evaluateur edf Emptypar Marc Dim 21 Avr 2024 - 2:41

» 2D_fill_color(résolu)
mon evaluateur edf Emptypar leclode Sam 20 Avr 2024 - 8:32

» Consommation gaz électricité
mon evaluateur edf Emptypar leclode Mer 17 Avr 2024 - 11:07

» on_key_down (résolu)
mon evaluateur edf Emptypar leclode Mar 16 Avr 2024 - 11:01

» Sous-programme(résolu)
mon evaluateur edf Emptypar jjn4 Jeu 4 Avr 2024 - 14:42

Navigation
 Portail
 Index
 Membres
 Profil
 FAQ
 Rechercher
Rechercher
 
 

Résultats par :
 
Rechercher Recherche avancée
Avril 2024
LunMarMerJeuVenSamDim
1234567
891011121314
15161718192021
22232425262728
2930     
CalendrierCalendrier
-40%
Le deal à ne pas rater :
Tefal Ingenio Emotion – Batterie de cuisine 10 pièces (induction, ...
59.99 € 99.99 €
Voir le deal

 

 mon evaluateur edf

Aller en bas 
2 participants
AuteurMessage
Yannick




Nombre de messages : 8610
Age : 52
Localisation : Bretagne
Date d'inscription : 15/02/2010

mon evaluateur edf Empty
MessageSujet: mon evaluateur edf   mon evaluateur edf EmptyLun 22 Fév 2010 - 11:56

si quelqu'un veut m'aider à améliorer et corriger les bug ....

voilà la source.BAS
le fichier Parametres.txt est facile à créer, 17 lignes avec "0" sur chaque et vous aurez un fichier initialisé à mettre à jours avec les bons chiffres

Code:
height 0,405
width 0,510
caption 0,"Evaluateur EDF"
color 0,255,255,255
dim Nhc,Nhp,ABT,THP,THC,CTA,CSPE,MHC,MHP,MCSPE,FACT,ABT$,THP$,THC$,CTA$,CSPE$,MHC$,MHP$,MCSPE$,FACT$
dim TVA1$,TVA2$,TVA1,TVA2,TXBTL$,TXBTL,TXTLC$,TXTLC,TXTLD$,TXTLD,TL,ABT2,CTA2,TL2

label clk1,clk2

rem 'Entrée des paramètres de base

rem 'Type de compteur

Alpha 1
top 1,35
left 1,20
font_bold 1
caption 1,"Type de compteur :"
font_color 1,0,0,160

combo 2
top 2,50
left 2,20
item_add 2,"Simple"
item_add 2,"Hc / Hp"

rem 'Puissance

Alpha 3
top 3,75
left 3,20
font_bold 3
caption 3,"Puissance :"
font_color 3,0,0,160

combo 4
top 4,90
left 4,20
width 4,65
item_add 4,"6 KwH"
item_add 4,"9 KwH"

rem 'Conso Hc

Alpha 5
top 5,135
left 5,20
font_bold 5
caption 5,"Nombre de KwH/Hc:"
font_color 5,0,0,160

track_bar 6:left 6,15:top 6,155:width 6,400
min 6,0:max 6,5000

alpha 7
top 7,155
left 7,420
caption 7,"0"
font_name 7,"Times new roman"
font_color 7,255,0,0

rem 'Conso Hp

Alpha 8
top 8,205
left 8,20
font_bold 8
caption 8,"Nombre de KwH/Hp:"
font_color 8,0,0,160

track_bar 9:left 9,15:top 9,225:width 9,400
min 9,0:max 9,5000

alpha 10
top 10,225
left 10,420
caption 10,"0"
font_name 10,"Times new roman"
font_color 10,255,0,0

rem 'Montant de la douloureuse

Alpha 11
top 11,285
left 11,80
caption 11,"Montant :"
font_size 11,18
font_bold 11
font_name 11,"Times new roman"
font_color 11,11,0,255

Alpha 12
top 12,285
left 12,210
caption 12,"0,00"
font_size 12,18
font_bold 12
font_name 12,"Times new roman"

Alpha 13
top 13,285
left 13,350
caption 13,"€"
font_size 13,18
font_bold 13
font_name 13,"Times new roman"
font_color 13,11,0,255

picture 15
top 15,20
left 15,270
height 15,99
width 15,200
file_load 15,"logo.bmp"
Hint 15,"Cliquez pour modifier les paramètres de calcul"

dlist 14
file_load 14,"Parametres.txt"

rem 'Chmilblic pour l'évolution des KwH et du montant

on_click 15,clk1
on_change 2,clk2
on_change 4,clk2
on_change 6,clk2
on_change 9,clk2
end

clk1:
form 16
caption 16,"Paramètres"
width 16,510
height 16,550
color 16,174,209,222
command_target_is 16

Alpha 17
caption 17,"Abt Simple 6 KwH"
top 17,20
left 17,10

edit 35
top 35,15
left 35,110
width 35,60

alpha 18
caption 18,"Abt Simple 9 KwH"
top 18,20
left 18,250

edit 36
top 36,15
left 36,370
width 36,60

alpha 19
caption 19,"Abt Hc/Hp 6 KwH"
top 19,60
left 19,10

edit 37
top 37,55
left 37,110
width 37,60

alpha 20
caption 20,"Abt Hc/Hp 9 KwH"
top 20,60
left 20,250

edit 38
top 38,55
left 38,370
width 38,60

2d_target_is 16
2d_line 10,95,450,95
2d_pen_width 2

alpha 21
caption 21,"Tarif KwH simple 6 KwH"
top 21,110
left 21,10

edit 39
top 39,105
left 39,155
width 39,60

alpha 22
caption 22,"Tarif KwH simple 9 KwH"
top 22,140
left 22,10

edit 40
top 40,135
left 40,155
width 40,60

alpha 23
caption 23,"Tarif KwH Hc/Hp 6 KwH Hc"
top 23,170
left 23,10

edit 41
top 41,165
left 41,155
width 41,60

alpha 24
caption 24,"Tarif KwH Hc/Hp 6 KwH Hp"
top 24,170
left 24,250

edit 42
top 42,165
left 42,370
width 42,60

alpha 25
caption 25,"Tarif KwH Hc/Hp 9 KwH Hc"
top 25,200
left 25,10

edit 43
top 43,195
left 43,155
width 43,60

alpha 26
caption 26,"Tarif KwH Hc/Hp 9 KwH Hp"
top 26,200
left 26,250

edit 44
top 44,195
left 44,370
width 44,60

2d_target_is 16
2d_line 10,235,450,235
2d_pen_width 2

alpha 27
caption 27,"TVA 1"
top 27,260
left 27,10

edit 45
top 45,255
left 45,155
width 45,60

alpha 28
caption 28,"TVA 2"
top 28,260
left 28,250

edit 46
top 46,255
left 46,370
width 46,60

2d_target_is 16
2d_line 10,300,450,300
2d_pen_width 2

alpha 29
caption 29,"Tx pour calcul des bases pour taxes locales"
top 29,315
left 29,10

edit 47
top 47,310
left 47,370
width 47,60

alpha 30
caption 30,"Tx Taxe Locale Com."
top 30,345
left 30,10

edit 48
top 48,340
left 48,155
width 48,60

alpha 31
caption 31,"Tx Taxe Locale Dép."
top 31,345
left 31,250

edit 49
top 49,340
left 49,370
width 49,60

2d_target_is 16
2d_line 10,370,450,370
2d_pen_width 2

alpha 32
caption 32,"CTA"
top 32,400
left 32,10

edit 50
top 50,395
left 50,155
width 50,60

alpha 33
caption 33,"CSPE"
top 33,400
left 33,250

edit 51
top 51,395
left 51,370
width 51,60

button 34
caption 34,"Modifier/Quitter"
top 34,450
left 34,350
width 34,100

dlist 52
file_load 52,"Parametres.txt"

text 35,item_read$(52,1)
text 36,item_read$(52,2)
text 37,item_read$(52,3)
text 38,item_read$(52,4)
text 39,item_read$(52,5)
text 40,item_read$(52,6)
text 41,item_read$(52,7)
text 42,item_read$(52,8)
text 43,item_read$(52,9)
text 44,item_read$(52,10)
text 45,item_read$(52,11)
text 46,item_read$(52,12)
text 47,item_read$(52,13)
text 48,item_read$(52,14)
text 49,item_read$(52,15)
text 50,item_read$(52,16)
text 51,item_read$(52,17)

label clk3

on_click 34,clk3
end

clk3:
clear 52
item_add 52,text$(35)
item_add 52,text$(36)
item_add 52,text$(37)
item_add 52,text$(38)
item_add 52,text$(39)
item_add 52,text$(40)
item_add 52,text$(41)
item_add 52,text$(42)
item_add 52,text$(43)
item_add 52,text$(44)
item_add 52,text$(45)
item_add 52,text$(46)
item_add 52,text$(47)
item_add 52,text$(48)
item_add 52,text$(49)
item_add 52,text$(50)
item_add 52,text$(51)
file_save 52,"Parametres.txt"
hide 16
return

return

clk2:

Nhc=position(6)
Nhp=position(9)
if item_index(2)=0 and item_index(4)=0 then ABT$="0"
if item_index(2)=0 and item_index(4)=0 then THC$="0"
if item_index(2)=0 and item_index(4)=0 then THP$="0"
if item_index(2)=0 and item_index(4)=1 then ABT$="0"
if item_index(2)=0 and item_index(4)=1 then THC$="0"
if item_index(2)=0 and item_index(4)=1 then THP$="0"
if item_index(2)=0 and item_index(4)=2 then ABT$="0"
if item_index(2)=0 and item_index(4)=2 then THC$="0"
if item_index(2)=0 and item_index(4)=2 then THP$="0"
if item_index(2)=1 and item_index(4)=0 then ABT$="0"
if item_index(2)=1 and item_index(4)=0 then THC$="0"
if item_index(2)=1 and item_index(4)=0 then THP$="0"
if item_index(2)=1 and item_index(4)=1 then ABT$=item_read$(14,1)
if item_index(2)=1 and item_index(4)=1 then THC$=item_read$(14,5)
if item_index(2)=1 and item_index(4)=1 then THP$="0"
if item_index(2)=1 and item_index(4)=2 then ABT$=item_read$(14,2)
if item_index(2)=1 and item_index(4)=1 then THC$=item_read$(14,6)
if item_index(2)=1 and item_index(4)=1 then THP$="0"
if item_index(2)=2 and item_index(4)=0 then ABT$="0"
if item_index(2)=2 and item_index(4)=0 then THC$="0"
if item_index(2)=2 and item_index(4)=0 then THP$="0"
if item_index(2)=2 and item_index(4)=1 then ABT$=item_read$(14,3)
if item_index(2)=2 and item_index(4)=1 then THC$=item_read$(14,7)
if item_index(2)=2 and item_index(4)=1 then THP$=item_read$(14,8)
if item_index(2)=2 and item_index(4)=2 then ABT$=item_read$(14,4)
if item_index(2)=2 and item_index(4)=2 then THP$=item_read$(14,10)
if item_index(2)=2 and item_index(4)=2 then THC$=item_read$(14,9)
TVA1$=item_read$(14,11)
TVA2$=item_read$(14,12)
CTA$=item_read$(14,16)
CSPE$=item_read$(14,17)
TXBTL$=item_read$(14,13)
TXTLC$=item_read$(14,14)
TXTLD$=item_read$(14,15)
CSPE=val(CSPE$)
CTA=val(CTA$)
THC=val(THC$)
THP=val(THP$)
ABT=val(ABT$)
TVA1=val(TVA1$)
TVA2=val(TVA2$)
TXBTL=val(TXBTL$)
TXTLC=val(TXTLC$)
TXTLD=val(TXTLD$)
CTA2=CTA*(TVA1+1)
ABT2=ABT*(TVA1+1)
MHC=THC*Nhc*(TVA2+1)
MHP=THP*Nhp*(TVA2+1)
TL=((TXBTL*THP*Nhp*TXTLC)+(TXBTL*THC*Nhc*TXTLD))*(TVA2+1)
TL2=((TXBTL*ABT*TXTLC)+(TXBTL*ABT*TXTLD))*(TVA1+1)
MCSPE=CSPE*(Nhp+Nhc)*(TVA2+1)
FACT=MHP+MHC+MCSPE+CTA2+ABT2+TL+TL2
caption 7,str$(Nhc)
caption 10,str$(Nhp)
caption 12,str$(FACT)
Revenir en haut Aller en bas
jjn4

jjn4


Nombre de messages : 2690
Date d'inscription : 13/09/2009

mon evaluateur edf Empty
MessageSujet: +++   mon evaluateur edf EmptyLun 22 Fév 2010 - 12:22

Mets tes programmes dans une case idoine,
cela évitera que le logiciel prenne les -8-)- pour des clins d'oeil. Cool
Pour cela, tu cliques sur le bouton 'code' au début,
ensuite, tu colles, puis tu réappuie sur le bouton 'code' pour fermer.
J'ai jeté un oeil à ton programme que j'ai dû adapter,
car je n'avais pas les paramètres,
globalement ça a l'air de marcher
même si les sommes m'ont paru un peu fortes,
(payer 146 millions d'euros pour une facture edf paraît un peu excessif)
mais ce sont peut-être les faux paramètres que j'avais entrés.
Je ne vois pas d'erreur.
Dis-donc, tu t'y connais en edf, toi !
Tu devrais noux expliquer comment ça marche, ce serait utile !
jocolor
PS: Ah, j'avais pas mis des 0...
Tiens, maintenant, la facture est de 0€, c'est super, ça !
Bon, je ne vais pas chercher plus longtemps
(je n'aime pas trop les programmes de calcul)
mais à mon avis, le 'file_save 52,'Parametres.txt' du clk3:
ne fonctionne pas, car le fichier Parametres.txt reste toujours avec des 0.
Revenir en haut Aller en bas
http://jjn4.e-monsite.com
Invité
Invité




mon evaluateur edf Empty
MessageSujet: Re: mon evaluateur edf   mon evaluateur edf EmptyLun 22 Fév 2010 - 13:51

Moi non plus je n'ai pas vu d'erreurs.
Et comme jjn4 dit il remplace les Cool par des Cool alors il faut changer ça dans l'éditeur.
Et une autre chose (un petit détail)
On ne peut pas cliquer deux fois sur l'image pour calculer alors j'ai un peu changer.

Code:
height 0,405
width 0,510
caption 0,"Evaluateur EDF"
color 0,255,255,255
dim Nhc,Nhp,ABT,THP,THC,CTA,CSPE,MHC,MHP,MCSPE,FACT,ABT$,THP$,THC$,CTA$,CSPE$,MHC$,MHP$,MCSPE$,FACT$
dim TVA1$,TVA2$,TVA1,TVA2,TXBTL$,TXBTL,TXTLC$,TXTLC,TXTLD$,TXTLD,TL,ABT2,CTA2,TL2,Cool

label clk1,clk2,clk3

rem 'Entrée des paramètres de base

rem 'Type de compteur

Alpha 1
top 1,35
left 1,20
font_bold 1
caption 1,"Type de compteur :"
font_color 1,0,0,160

combo 2
top 2,50
left 2,20
item_add 2,"Simple"
item_add 2,"Hc / Hp"

rem 'Puissance

Alpha 3
top 3,75
left 3,20
font_bold 3
caption 3,"Puissance :"
font_color 3,0,0,160

combo 4
top 4,90
left 4,20
width 4,65
item_add 4,"6 KwH"
item_add 4,"9 KwH"

rem 'Conso Hc

Alpha 5
top 5,135
left 5,20
font_bold 5
caption 5,"Nombre de KwH/Hc:"
font_color 5,0,0,160

track_bar 6:left 6,15:top 6,155:width 6,400
min 6,0:max 6,5000

alpha 7
top 7,155
left 7,420
caption 7,"0"
font_name 7,"Times new roman"
font_color 7,255,0,0

rem 'Conso Hp

Alpha 8
top 8,205
left 8,20
font_bold 8
caption 8,"Nombre de KwH/Hp:"
font_color 8,0,0,160

track_bar 9:left 9,15:top 9,225:width 9,400
min 9,0:max 9,5000

alpha 10
top 10,225
left 10,420
caption 10,"0"
font_name 10,"Times new roman"
font_color 10,255,0,0

rem 'Montant de la douloureuse

Alpha 11
top 11,285
left 11,80
caption 11,"Montant :"
font_size 11,18
font_bold 11
font_name 11,"Times new roman"
font_color 11,11,0,255

Alpha 12
top 12,285
left 12,210
caption 12,"0,00"
font_size 12,18
font_bold 12
font_name 12,"Times new roman"

Alpha 13
top 13,285
left 13,350
caption 13,"€"
font_size 13,18
font_bold 13
font_name 13,"Times new roman"
font_color 13,11,0,255

picture 15
top 15,20
left 15,270
height 15,99
width 15,200
file_load 15,"C:\Documents and Settings\Enfants\Bureau\Nicolas\mes images et photos\bmp\Oui.bmp"
Hint 15,"Cliquez pour modifier les paramètres de calcul"

dlist 14
file_load 14,"C:\Documents and Settings\Enfants\Bureau\Nicolas\Panoramic et fortran\Exemples\INPORTANT\Parametres.txt"

rem 'Chmilblic pour l'évolution des KwH et du montant

on_click 15,clk1
on_change 2,clk2
on_change 4,clk2
on_change 6,clk2
on_change 9,clk2

rem invisible -------------------------------

form 16
hide 16
caption 16,"Paramètres"
width 16,510
height 16,550
color 16,174,209,222
command_target_is 16

Alpha 17
caption 17,"Abt Simple 6 KwH"
top 17,20
left 17,10

edit 35
top 35,15
left 35,110
width 35,60

alpha 18
caption 18,"Abt Simple 9 KwH"
top 18,20
left 18,250

edit 36
top 36,15
left 36,370
width 36,60

alpha 19
caption 19,"Abt Hc/Hp 6 KwH"
top 19,60
left 19,10

edit 37
top 37,55
left 37,110
width 37,60

alpha 20
caption 20,"Abt Hc/Hp 9 KwH"
top 20,60
left 20,250

edit 38
top 38,55
left 38,370
width 38,60

2d_target_is 16
2d_line 10,95,450,95
2d_pen_width 2

alpha 21
caption 21,"Tarif KwH simple 6 KwH"
top 21,110
left 21,10

edit 39
top 39,105
left 39,155
width 39,60

alpha 22
caption 22,"Tarif KwH simple 9 KwH"
top 22,140
left 22,10

edit 40
top 40,135
left 40,155
width 40,60

alpha 23
caption 23,"Tarif KwH Hc/Hp 6 KwH Hc"
top 23,170
left 23,10

edit 41
top 41,165
left 41,155
width 41,60

alpha 24
caption 24,"Tarif KwH Hc/Hp 6 KwH Hp"
top 24,170
left 24,250

edit 42
top 42,165
left 42,370
width 42,60

alpha 25
caption 25,"Tarif KwH Hc/Hp 9 KwH Hc"
top 25,200
left 25,10

edit 43
top 43,195
left 43,155
width 43,60

alpha 26
caption 26,"Tarif KwH Hc/Hp 9 KwH Hp"
top 26,200
left 26,250

edit 44
top 44,195
left 44,370
width 44,60

2d_target_is 16
2d_line 10,235,450,235
2d_pen_width 2

alpha 27
caption 27,"TVA 1"
top 27,260
left 27,10

edit 45
top 45,255
left 45,155
width 45,60

alpha 28
caption 28,"TVA 2"
top 28,260
left 28,250

edit 46
top 46,255
left 46,370
width 46,60

2d_target_is 16
2d_line 10,300,450,300
2d_pen_width 2

alpha 29
caption 29,"Tx pour calcul des bases pour taxes locales"
top 29,315
left 29,10

edit 47
top 47,310
left 47,370
width 47,60

alpha 30
caption 30,"Tx Taxe Locale Com."
top 30,345
left 30,10

edit 48
top 48,340
left 48,155
width 48,60

alpha 31
caption 31,"Tx Taxe Locale Dép."
top 31,345
left 31,250

edit 49
top 49,340
left 49,370
width 49,60

2d_target_is 16
2d_line 10,370,450,370
2d_pen_width 2

alpha 32
caption 32,"CTA"
top 32,400
left 32,10

edit 50
top 50,395
left 50,155
width 50,60

alpha 33
caption 33,"CSPE"
top 33,400
left 33,250

edit 51
top 51,395
left 51,370
width 51,60

button 34
caption 34,"Modifier/Quitter"
top 34,450
left 34,350
width 34,100

dlist 52
file_load 52,"C:\Documents and Settings\Enfants\Bureau\Nicolas\Panoramic et fortran\Exemples\INPORTANT\Parametres.txt"
on_click 34,clk3
end

clk1:
show 16
text 35,item_read$(52,1)
text 36,item_read$(52,2)
text 37,item_read$(52,3)
text 38,item_read$(52,4)
text 39,item_read$(52,5)
text 40,item_read$(52,6)
text 41,item_read$(52,7)
text 42,item_read$(52,8)
text 43,item_read$(52,9)
text 44,item_read$(52,10)
text 45,item_read$(52,11)
text 46,item_read$(52,12)
text 47,item_read$(52,13)
text 48,item_read$(52,14)
text 49,item_read$(52,15)
text 50,item_read$(52,16)
text 51,item_read$(52,17)
end

clk3:
clear 52
item_add 52,text$(35)
item_add 52,text$(36)
item_add 52,text$(37)
item_add 52,text$(38)
item_add 52,text$(39)
item_add 52,text$(40)
item_add 52,text$(41)
item_add 52,text$(42)
item_add 52,text$(43)
item_add 52,text$(44)
item_add 52,text$(45)
item_add 52,text$(46)
item_add 52,text$(47)
item_add 52,text$(48)
item_add 52,text$(49)
item_add 52,text$(50)
item_add 52,text$(51)
file_save 52,"Parametres.txt"
hide 16
return

return

clk2:

Nhc=position(6)
Nhp=position(9)
if item_index(2)=0 and item_index(4)=0 then ABT$="0"
if item_index(2)=0 and item_index(4)=0 then THC$="0"
if item_index(2)=0 and item_index(4)=0 then THP$="0"
if item_index(2)=0 and item_index(4)=1 then ABT$="0"
if item_index(2)=0 and item_index(4)=1 then THC$="0"
if item_index(2)=0 and item_index(4)=1 then THP$="0"
if item_index(2)=0 and item_index(4)=2 then ABT$="0"
if item_index(2)=0 and item_index(4)=2 then THC$="0"
if item_index(2)=0 and item_index(4)=2 then THP$="0"
if item_index(2)=1 and item_index(4)=0 then ABT$="0"
if item_index(2)=1 and item_index(4)=0 then THC$="0"
if item_index(2)=1 and item_index(4)=0 then THP$="0"
if item_index(2)=1 and item_index(4)=1 then ABT$=item_read$(14,1)
if item_index(2)=1 and item_index(4)=1 then THC$=item_read$(14,5)
if item_index(2)=1 and item_index(4)=1 then THP$="0"
if item_index(2)=1 and item_index(4)=2 then ABT$=item_read$(14,2)
if item_index(2)=1 and item_index(4)=1 then THC$=item_read$(14,6)
if item_index(2)=1 and item_index(4)=1 then THP$="0"
if item_index(2)=2 and item_index(4)=0 then ABT$="0"
if item_index(2)=2 and item_index(4)=0 then THC$="0"
if item_index(2)=2 and item_index(4)=0 then THP$="0"
if item_index(2)=2 and item_index(4)=1 then ABT$=item_read$(14,3)
if item_index(2)=2 and item_index(4)=1 then THC$=item_read$(14,7)
if item_index(2)=2 and item_index(4)=1 then THP$=item_read$(14,Cool
if item_index(2)=2 and item_index(4)=2 then ABT$=item_read$(14,4)
if item_index(2)=2 and item_index(4)=2 then THP$=item_read$(14,10)
if item_index(2)=2 and item_index(4)=2 then THC$=item_read$(14,9)
TVA1$=item_read$(14,11)
TVA2$=item_read$(14,12)
CTA$=item_read$(14,16)
CSPE$=item_read$(14,17)
TXBTL$=item_read$(14,13)
TXTLC$=item_read$(14,14)
TXTLD$=item_read$(14,15)
CSPE=val(CSPE$)
CTA=val(CTA$)
THC=val(THC$)
THP=val(THP$)
ABT=val(ABT$)
TVA1=val(TVA1$)
TVA2=val(TVA2$)
TXBTL=val(TXBTL$)
TXTLC=val(TXTLC$)
TXTLD=val(TXTLD$)
CTA2=CTA*(TVA1+1)
ABT2=ABT*(TVA1+1)
MHC=THC*Nhc*(TVA2+1)
MHP=THP*Nhp*(TVA2+1)
TL=((TXBTL*THP*Nhp*TXTLC)+(TXBTL*THC*Nhc*TXTLD))*(TVA2+1)
TL2=((TXBTL*ABT*TXTLC)+(TXBTL*ABT*TXTLD))*(TVA1+1)
MCSPE=CSPE*(Nhp+Nhc)*(TVA2+1)
FACT=MHP+MHC+MCSPE+CTA2+ABT2+TL+TL2
caption 7,str$(Nhc)
caption 10,str$(Nhp)
caption 12,str$(FACT)
Revenir en haut Aller en bas
Yannick




Nombre de messages : 8610
Age : 52
Localisation : Bretagne
Date d'inscription : 15/02/2010

mon evaluateur edf Empty
MessageSujet: Merci   mon evaluateur edf EmptyMer 24 Fév 2010 - 17:15

Merci à vous pour le regard que vous avez eu sur mon " premier" programme en Panoramic.
Je suis désolé pour ceux qui préfèrent les jeux mais c pas mon truc.
mon dada à moi c les petits utilitaires
je regarde hors ligne vos commentaires et à bientot
Revenir en haut Aller en bas
Invité
Invité




mon evaluateur edf Empty
MessageSujet: Re: mon evaluateur edf   mon evaluateur edf EmptyMer 24 Fév 2010 - 22:53

C'était super ygeronimi !
Et moi en passant j'aime mieux les utilitaires que les jeux
Revenir en haut Aller en bas
Yannick




Nombre de messages : 8610
Age : 52
Localisation : Bretagne
Date d'inscription : 15/02/2010

mon evaluateur edf Empty
MessageSujet: Correction   mon evaluateur edf EmptyVen 26 Fév 2010 - 14:29

voilà ma copie corrigée du source.bas.
je rappelle qu'il faut un fichier nommé "Parametres.txt" avec 17 lignes avec une écriture "0" placé dans le dossier du source.bas pour avoir un fichier initial après ben il faut entrer les paramètres edf du momment.

Bon pour moi qui suit en 9 kwh hc/hp voilà le fichier txt :
Code:

0
0
0
10.10
0
0
0
0
0.0519
0.0839
0.055
0.196
0.8
0.04
0.08
2.27
0.0045

et pour le source.bas
Code:

height 0,405
width 0,510
dim clarg,clong
clarg=(screen_x-510)/2
clong=(screen_y-405)/2
top 0,clong
left 0,clarg
caption 0,"Evaluateur EDF"
color 0,255,255,255

dim Nhc,Nhp,ABT,THP,THC,CTA,CSPE,MHC,MHP,MCSPE,FACT,ABT$,THP$,THC$,CTA$,CSPE$,MHC$,MHP$,MCSPE$,FACT$
dim TVA1$,TVA2$,TVA1,TVA2,TXBTL$,TXBTL,TXTLC$,TXTLC,TXTLD$,TXTLD,TL,ABT2,CTA2,TL2

label clk1,clk2,clk3
rem 'Interface************************************************************************************
rem 'Entrée des paramètres de base

main_menu 53
sub_menu 54 : caption 54,"Paramètres": parent 54,53

rem 'Type de compteur

Alpha 1:top 1,35:left 1,20:font_bold 1:caption 1,"Type de compteur :":font_color 1,0,0,160
combo 2:top 2,50:left 2,20:item_add 2,"Simple":item_add 2,"Hc / Hp"

rem 'Puissance

Alpha 3:top 3,75:left 3,20:font_bold 3:caption 3,"Puissance :":font_color 3,0,0,160
combo 4:top 4,90:left 4,20:width 4,65:item_add 4,"6 KwH":item_add 4,"9 KwH"

rem 'Conso Hc

Alpha 5:top 5,170:left 5,20:font_bold 5:caption 5,"Nombre de KwH/Hc:":font_color 5,0,0,160
spin 6:left 6,20:top 6,195:width 6,80
alpha 7:top 7,200:left 7,105:caption 7,"KwH":font_name 7,"Times new roman":font_color 7,255,0,0

rem 'Conso Hp

Alpha 8:top 8,170:left 8,220:font_bold 8:caption 8,"Nombre de KwH/Hp:":font_color 8,0,0,160
spin 9:left 9,220:top 9,195:width 9,80
alpha 10:top 10,200:left 10,305:caption 10,"KwH":font_name 10,"Times new roman":font_color 10,255,0,0

rem 'Montant de la douloureuse

Alpha 11:top 11,285:left 11,80:caption 11,"Montant :":font_size 11,18:font_bold 11:font_name 11,"Times new roman":font_color 11,11,0,255
Alpha 12:top 12,285:left 12,210:caption 12,"0,00  €":font_size 12,18:font_bold 12:font_name 12,"Times new roman"

picture 15:top 15,20:left 15,270:height 15,99:width 15,200:file_load 15,"logo.bmp"

form 16:caption 16,"Paramètres":width 16,510:height 16,550:color 16,174,209,222:hide 16
command_target_is 16

Alpha 17:caption 17,"Abt Simple 6 KwH":top 17,20:left 17,10
edit 35:top 35,15:left 35,110:width 35,60

alpha 18:caption 18,"Abt Simple 9 KwH":top 18,20:left 18,250
edit 36:top 36,15:left 36,370:width 36,60

alpha 19:caption 19,"Abt Hc/Hp 6 KwH":top 19,60:left 19,10
edit 37:top 37,55:left 37,110:width 37,60

alpha 20:caption 20,"Abt Hc/Hp 9 KwH":top 20,60:left 20,250
edit 38:top 38,55:left 38,370:width 38,60

2d_target_is 16:2d_line 10,95,450,95:2d_pen_width 2

alpha 21:caption 21,"Tarif KwH simple 6 KwH":top 21,110:left 21,10
edit 39:top 39,105:left 39,155:width 39,60

alpha 22:caption 22,"Tarif KwH simple 9 KwH":top 22,140:left 22,10
edit 40:top 40,135:left 40,155:width 40,60

alpha 23:caption 23,"Tarif KwH Hc/Hp 6 KwH Hc":top 23,170:left 23,10
edit 41:top 41,165:left 41,155:width 41,60

alpha 24:caption 24,"Tarif KwH Hc/Hp 6 KwH Hp":top 24,170:left 24,250
edit 42:top 42,165:left 42,370:width 42,60

alpha 25:caption 25,"Tarif KwH Hc/Hp 9 KwH Hc":top 25,200:left 25,10
edit 43:top 43,195:left 43,155:width 43,60

alpha 26:caption 26,"Tarif KwH Hc/Hp 9 KwH Hp":top 26,200:left 26,250
edit 44:top 44,195:left 44,370:width 44,60

2d_target_is 16:2d_line 10,235,450,235:2d_pen_width 2

alpha 27:caption 27,"TVA 1":top 27,260:left 27,10
edit 45:top 45,255:left 45,155:width 45,60

alpha 28:caption 28,"TVA 2":top 28,260:left 28,250
edit 46:top 46,255:left 46,370:width 46,60

2d_target_is 16:2d_line 10,300,450,300:2d_pen_width 2

alpha 29:caption 29,"Tx pour calcul des bases pour taxes locales":top 29,315:left 29,10
edit 47:top 47,310:left 47,370:width 47,60

alpha 30:caption 30,"Tx Taxe Locale Com.":top 30,345:left 30,10
edit 48:top 48,340:left 48,155:width 48,60

alpha 31:caption 31,"Tx Taxe Locale Dép.":top 31,345:left 31,250
edit 49:top 49,340:left 49,370:width 49,60

2d_target_is 16:2d_line 10,370,450,370:2d_pen_width 2

alpha 32:caption 32,"CTA":top 32,400:left 32,10
edit 50:top 50,395:left 50,155:width 50,60

alpha 33:caption 33,"CSPE":top 33,400:left 33,250
edit 51:top 51,395:left 51,370:width 51,60

button 34:caption 34,"Modifier/Quitter":top 34,450:left 34,350:width 34,100

dlist 52
file_load 52,"Parametres.txt"

text 35,item_read$(52,1)
text 36,item_read$(52,2)
text 37,item_read$(52,3)
text 38,item_read$(52,4)
text 39,item_read$(52,5)
text 40,item_read$(52,6)
text 41,item_read$(52,7)
text 42,item_read$(52,8)
text 43,item_read$(52,9)
text 44,item_read$(52,10)
text 45,item_read$(52,11)
text 46,item_read$(52,12)
text 47,item_read$(52,13)
text 48,item_read$(52,14)
text 49,item_read$(52,15)
text 50,item_read$(52,16)
text 51,item_read$(52,17)

dlist 14
file_load 14,"Parametres.txt"

rem 'Chmilblic pour l'évolution des KwH et du montant

on_click 54,clk1
on_change 2,clk2
on_change 4,clk2
on_change 6,clk2
on_change 9,clk2
on_click 34,clk3
end

clk1:
show 16
return

clk3:
clear 52
item_add 52,text$(35)
item_add 52,text$(36)
item_add 52,text$(37)
item_add 52,text$(38)
item_add 52,text$(39)
item_add 52,text$(40)
item_add 52,text$(41)
item_add 52,text$(42)
item_add 52,text$(43)
item_add 52,text$(44)
item_add 52,text$(45)
item_add 52,text$(46)
item_add 52,text$(47)
item_add 52,text$(48)
item_add 52,text$(49)
item_add 52,text$(50)
item_add 52,text$(51)
file_save 52,"Parametres.txt"
hide 16
return

clk2:
Nhc=position(6)
Nhp=position(9)
if item_index(2)=0 and item_index(4)=0 then ABT$="0"
if item_index(2)=0 and item_index(4)=0 then THC$="0"
if item_index(2)=0 and item_index(4)=0 then THP$="0"
if item_index(2)=0 and item_index(4)=1 then ABT$="0"
if item_index(2)=0 and item_index(4)=1 then THC$="0"
if item_index(2)=0 and item_index(4)=1 then THP$="0"
if item_index(2)=0 and item_index(4)=2 then ABT$="0"
if item_index(2)=0 and item_index(4)=2 then THC$="0"
if item_index(2)=0 and item_index(4)=2 then THP$="0"
if item_index(2)=1 and item_index(4)=0 then ABT$="0"
if item_index(2)=1 and item_index(4)=0 then THC$="0"
if item_index(2)=1 and item_index(4)=0 then THP$="0"
if item_index(2)=1 and item_index(4)=1 then ABT$=item_read$(14,1)
if item_index(2)=1 and item_index(4)=1 then THC$=item_read$(14,5)
if item_index(2)=1 and item_index(4)=1 then THP$="0"
if item_index(2)=1 and item_index(4)=2 then ABT$=item_read$(14,2)
if item_index(2)=1 and item_index(4)=1 then THC$=item_read$(14,6)
if item_index(2)=1 and item_index(4)=1 then THP$="0"
if item_index(2)=2 and item_index(4)=0 then ABT$="0"
if item_index(2)=2 and item_index(4)=0 then THC$="0"
if item_index(2)=2 and item_index(4)=0 then THP$="0"
if item_index(2)=2 and item_index(4)=1 then ABT$=item_read$(14,3)
if item_index(2)=2 and item_index(4)=1 then THC$=item_read$(14,7)
if item_index(2)=2 and item_index(4)=1 then THP$=item_read$(14,8)
if item_index(2)=2 and item_index(4)=2 then ABT$=item_read$(14,4)
if item_index(2)=2 and item_index(4)=2 then THP$=item_read$(14,10)
if item_index(2)=2 and item_index(4)=2 then THC$=item_read$(14,9)
TVA1$=item_read$(14,11)
TVA2$=item_read$(14,12)
CTA$=item_read$(14,16)
CSPE$=item_read$(14,17)
TXBTL$=item_read$(14,13)
TXTLC$=item_read$(14,14)
TXTLD$=item_read$(14,15)
CSPE=val(CSPE$)
CTA=val(CTA$)
THC=val(THC$)
THP=val(THP$)
ABT=val(ABT$)
TVA1=val(TVA1$)
TVA2=val(TVA2$)
TXBTL=val(TXBTL$)
TXTLC=val(TXTLC$)
TXTLD=val(TXTLD$)
CTA2=CTA*(TVA1+1)
ABT2=ABT*(TVA1+1)
MHC=THC*Nhc*(TVA2+1)
MHP=THP*Nhp*(TVA2+1)
TL=((TXBTL*THP*Nhp*TXTLC)+(TXBTL*THC*Nhc*TXTLD))*(TVA2+1)
TL2=((TXBTL*ABT*TXTLC)+(TXBTL*ABT*TXTLD))*(TVA1+1)
MCSPE=CSPE*(Nhp+Nhc)*(TVA2+1)
FACT=MHP+MHC+MCSPE+CTA2+ABT2+TL+TL2
caption 12,str$(FACT)+"  €"
return

Tout en faisant attention à rentrer les chiffres avec un "point" en lieu et place de la virgule dans les paramètres afin d'éviter une error .
Si quelqu'un sait comment réduire le nombre de chiffres affichés après cette virgule , je suis preneur.
Revenir en haut Aller en bas
jjn4

jjn4


Nombre de messages : 2690
Date d'inscription : 13/09/2009

mon evaluateur edf Empty
MessageSujet: +++   mon evaluateur edf EmptyVen 26 Fév 2010 - 14:45

Il y a sûrement des réponses plus simples,
et je crois que cosmos ou Jean Claude ou Klaus avaient déjà fait quelque chose dans ce sens avec des ##.##
En tout cas, je te propose ce moyen simple :
Code:
dim a , d , f , t
a=14/3 : print a
d=int(a) : print d
f=int((a-d)*100) : print f
t=d+f/100 : print t
(les print sont juste pour la démonstration)
Ce qui fait, au total :
Code:
a=14/3
t=int(a)+int((a-int(a))*100)/100
jocolor
PS: ça, c'est pour quand tu veux 2 chiffres après la virgule,
quand t'en veux 3, tu fais ...*1000)/1000,
et bien sûr, tu mets ce que tu veux comme contenu de a.
Revenir en haut Aller en bas
http://jjn4.e-monsite.com
Yannick




Nombre de messages : 8610
Age : 52
Localisation : Bretagne
Date d'inscription : 15/02/2010

mon evaluateur edf Empty
MessageSujet: Merci pour l'info   mon evaluateur edf EmptyVen 26 Fév 2010 - 16:09

Merci pour l'info
je vais essayer ca
la dans l' état actuel j'arrive selon la conso à des montant style 15.264512578 €
bizarre si edf accepte d' être paye au millionnième de cents.....
Revenir en haut Aller en bas
Contenu sponsorisé





mon evaluateur edf Empty
MessageSujet: Re: mon evaluateur edf   mon evaluateur edf Empty

Revenir en haut Aller en bas
 
mon evaluateur edf
Revenir en haut 
Page 1 sur 1
 Sujets similaires
-
» mon evaluateur veolia
» Calcul d'expressions saisies sous forme de chaîne.
» Evaluateur d'expressions mathématiques.
» Evaluateur d'expression en Panoramic.

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
FORUM DE DISCUSSION SUR LE LANGAGE PANORAMIC :: PANORAMIC :: Vos projets-
Sauter vers: