IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Langage Delphi Discussion :

convertir programme delphi 16bits avec delphi 3 pro (32bits)


Sujet :

Langage Delphi

  1. #1
    Nouveau Candidat au Club
    Homme Profil pro
    gestionnaire base de données
    Inscrit en
    Décembre 2011
    Messages
    5
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : gestionnaire base de données

    Informations forums :
    Inscription : Décembre 2011
    Messages : 5
    Points : 1
    Points
    1
    Par défaut convertir programme delphi 16bits avec delphi 3 pro (32bits)
    Bonjour,

    J'ai un programme écrit en Delphi 16bits que je veux convertir en Delphi 3 Pro (32bits) dont je dispose de la licence. L'appli ne tourne plus
    sous 64bits, ma seule porte de sortie est de convertir en 32bits pris en charge par WIN7 64bits. Je ne suis pas programmeur mais
    gestionnaire de base de données (on m'a expliqué comment compiler mon programme) et lorsque j'essaie de compiler avec Delphi 3 Pro,
    voici les erreurs de compilation.
    Quelqu'un pourrait-il m'aider ? Merci

    PS: vous trouverez peut-être cette démarche un peu ringarde, mais je n'ai pas les moyens d'autres choix


  2. #2
    Expert confirmé
    Avatar de Ph. B.
    Homme Profil pro
    Freelance
    Inscrit en
    Avril 2002
    Messages
    1 786
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 58
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations professionnelles :
    Activité : Freelance
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2002
    Messages : 1 786
    Points : 5 918
    Points
    5 918
    Par défaut
    Bonjour,

    On ne voit pas le type des variables concernées par les messages d'erreur, mais je pense qu'il s'agit de type string (géré différemment en 16 et 32 bits)
    Il faudrait remplacer le code
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    Res1: String;
    Res2: String;
    Res3: String;
    Res4: String;
    par
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    Res1: Shortstring;
    Res2: Shortstring;
    Res3: Shortstring;
    Res4: Shortstring;
    Vous risquez de rencontrer d'autres cas similaires mais peut être moins évident à reprendre. Une bonne série de tests va s'imposer...
    --
    Philippe.

  3. #3
    Nouveau Candidat au Club
    Homme Profil pro
    gestionnaire base de données
    Inscrit en
    Décembre 2011
    Messages
    5
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : gestionnaire base de données

    Informations forums :
    Inscription : Décembre 2011
    Messages : 5
    Points : 1
    Points
    1
    Par défaut
    Bonjour,

    voici le code complet de affichea.pas, qu'en pensez-vous ?


    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    434
    435
    436
    437
    438
    439
    440
    441
    442
    443
    444
    445
    446
    447
    448
    449
    450
    451
    452
    453
    454
    455
    456
    457
    458
    459
    460
    461
    462
    463
    464
    465
    466
    467
    468
    469
    470
    471
    472
    473
    474
    475
    476
    477
    478
    479
    480
    481
    482
    483
    484
    485
    486
    487
    488
    489
    490
    491
    492
    493
    494
    495
    496
    497
    498
    499
    500
    501
    502
    503
    504
    505
    506
    507
    508
    509
    510
    511
    512
    513
    514
    515
    516
    517
    518
    519
    520
    521
    522
    523
    524
    525
    526
    527
    528
    529
    530
    531
    532
    533
    534
    535
    536
    537
    538
    539
    540
    541
    542
    543
    544
    545
    546
    547
    548
    549
    550
    551
    552
    553
    554
    555
    556
    557
    558
    559
    560
    561
    562
    563
    564
    565
    566
    567
    568
    569
    570
    571
    572
    573
    574
    575
    576
    577
    578
    579
    580
    581
    582
    583
    584
    585
    586
    587
    588
    589
    590
    591
    592
    593
    594
    595
    596
    597
    598
    599
    600
    601
    602
    603
    604
    605
    606
    607
    608
    609
    610
    611
    612
    613
    614
    615
    616
    617
    618
    619
    620
    621
    622
    623
    624
    625
    626
    627
    628
    629
    630
    631
    632
    633
    634
    635
    636
    637
    638
    639
    640
    641
    642
    643
    644
    645
    646
    647
    648
    649
    650
    651
    652
    653
    654
    655
    656
    657
    658
    659
    660
    661
    662
    663
    664
    665
    666
    667
    668
    669
    670
    671
    672
    673
    674
    675
    676
    677
    678
    679
    680
    681
    682
    683
    684
    685
    686
    687
    688
    689
    690
    691
    692
    693
    694
    695
    696
    697
    698
    699
    700
    701
    702
    703
    704
    705
    706
    707
    708
    709
    710
    711
    712
    713
    714
    715
    716
    717
    718
    719
    720
    721
    722
    723
    724
    725
    726
    727
    728
    729
    730
    731
    732
    733
    734
    735
    736
    737
    738
    739
    740
    741
    742
    743
    744
    745
    746
    747
    748
    749
    750
    751
    752
    753
    754
    755
    756
    757
    758
    759
    760
    761
    762
    763
    764
    765
    766
    767
    768
    769
    770
    771
    772
    773
    774
    775
    776
    777
    778
    779
    780
    781
    782
    783
    784
    785
    786
    787
    788
    789
    790
    791
    792
    793
    794
    795
    796
    797
    798
    799
    800
    801
    802
    803
    804
    805
    806
    807
    808
    809
    810
    811
    812
    813
    814
    815
    816
    817
    818
    819
    820
    821
    822
    823
    824
    825
    826
    827
    828
    829
    830
    831
    832
    833
    834
    835
    836
    837
    838
    839
    840
    841
    842
    843
    844
    845
    846
    847
    848
    849
    850
    851
    852
    853
    854
    855
    856
    857
    858
    859
    860
    861
    862
    863
    864
    865
    866
    867
    868
    869
    870
    871
    872
    873
    874
    875
    876
    877
    878
    879
    880
    881
    882
    883
    884
    885
    886
    887
    888
    889
    890
    891
    892
    893
    894
    895
    896
    897
    898
    899
    900
    901
    902
    903
    904
    905
    906
    907
    908
    909
    910
    911
    912
    913
    914
    915
    916
    917
    918
    919
    920
    921
    922
    923
    924
    925
    926
    927
    928
    929
    930
    931
    932
    933
    934
    935
    936
    937
    938
    939
    940
    941
    942
    943
    944
    945
    946
    947
    948
    949
    950
    951
    952
    953
    954
    955
    956
    957
    958
    959
    960
    961
    962
    963
    964
    965
    966
    967
    968
    969
    970
    971
    972
    973
    974
    975
    976
    977
    978
    979
    980
    981
    982
    983
    984
    985
    986
    987
    988
    989
    990
    991
    992
    993
    994
    995
    996
    997
    998
    999
    1000
    1001
    1002
    1003
    1004
    1005
    1006
    1007
    1008
    1009
    1010
    1011
    1012
    1013
    1014
    1015
    1016
    1017
    1018
    1019
    1020
    1021
    1022
    1023
    1024
    1025
    1026
    1027
    1028
    1029
    1030
    1031
    1032
    1033
    1034
    1035
    1036
    1037
    1038
    1039
    1040
    1041
    1042
    1043
    1044
    1045
    1046
    1047
    1048
    1049
    1050
    1051
    1052
    1053
    1054
    1055
    1056
    1057
    1058
    1059
    1060
    1061
    1062
    1063
    1064
    1065
    1066
    1067
    1068
    1069
    1070
    1071
    1072
    1073
    1074
    1075
    1076
    1077
    1078
    1079
    1080
    1081
    1082
    1083
    1084
    1085
    1086
    1087
    1088
    1089
    1090
    1091
    1092
    1093
    1094
    1095
    1096
    1097
    1098
    1099
    1100
    1101
    1102
    1103
    1104
    1105
    1106
    1107
    1108
    1109
    1110
    1111
    1112
    1113
    1114
    1115
    1116
    1117
    1118
    1119
    1120
    1121
    1122
    1123
    1124
    1125
    1126
    1127
    1128
    1129
    1130
    1131
    1132
    1133
    1134
    1135
    1136
    1137
    1138
    1139
    1140
    1141
    1142
    1143
    //============================================================================}
    unit Affichea;
    {=============================================================================}
    {=============================================================================}
    interface
    {-----------------------------------  Uses  ----------------------------------}
    uses SysUtils, Classes, Graphics, requete;
    {--------------------------------  Constantes  -------------------------------}
    const
    {Couleur de mises en forme}
    COULEUR_DE_MISE_EN_VALEUR :  TColor = clYellow;
    COULEUR_DE_NON_MISE_EN_VALEUR = clBtnFace;
    {Fiche meca}
    AFFICHAGE_RESISTANCE_STR = 'Résistance (Rm)';
    AFFICHAGE_ELASTICITE_STR = 'Limite élastique mini';
    AFFICHAGE_DURETE_STR = 'Dureté maximale';
    VALEUR_DELTA_PAR_DEFAUT_STR = '50';
    VALEUR_DELTA_PAR_DEFAUT_INT = 50;
    UNITE_ELASTICITE_STR = ' Mpa';
    {Fiche chimique de l'alliage}
    AL : String = 'Aluminium  (Al)';
    AZ : String = 'Azote  (N)';
    C1 : String = 'Carbone (C)';
    CO : String = 'Cobalt  (Co)';
    CR : String = 'Chrome  (Cr)';
    CU : String = 'Cuivre  (Cu)';
    FE : String = 'Fer  (Fe)';
    MG : String = 'Magnésium  (Mg)';
    MN : String = 'Manganèse  (Mn)';
    MO : String = 'Molybdène  (Mo)';
    NB : String = 'Niobium  (Nb)';
    NI : String = 'Nickel  (Ni)';
    PB : String = 'Plomb  (Pb)';
    P1 : String = 'Phosphore (P)';
    SI : String = 'Silicium  (Si)';
    SN : String = 'Etain  (Sn)';
    S1 : String = 'Soufre  (S)';
     
    TI : String = 'Titane  (Ti)';
    V1 : String = 'Vanadium  (V)';
    W1 : String = 'Tungstène  (W)';
    ZN : String = 'Zinc  (Zn)';
     
     
    {-----------------------------------  Types  ---------------------------------}
    {------------------------------  Public methods  -----------------------------}
    procedure AfficheValeurs(AAfficher : Alliage; Demande : string;Champ : Integer;TypeRequete : Integer);
    procedure MiseEnEvidenceRequete(AAfficher : Alliage; Demande : string; Champ : Integer; TypeRequete : Integer);
    procedure AfficheValeurDurete(AAfficher : Alliage; Demande : string; Champ : Integer);
    procedure AfficheValeurElasticite(AAfficher : Alliage; Demande : string; Champ : Integer);
    procedure AfficheValeurResistance(AAfficher : Alliage; Demande : string; Champ : Integer);
    procedure MiseEnFormeChaineResistance(min : Integer; max : Integer; var Chaine : String);
    procedure AfficheResistance1(AAfficher : Alliage; var Result : String);
    procedure AfficheResistance2(AAfficher : Alliage; var Result : String);
    procedure AfficheDesignations(AAfficher : Alliage; Demande : string; Champ : Integer;TypeRequete : Integer);
    procedure AfficheProprietesChimiques(AAfficher : Alliage);
    procedure AfficheProprietesMecaniques(AAfficher : Alliage);
    procedure MiseAJour(var curLine : Integer; var curCol : Integer; var partie : Integer);
    procedure MiseAJourCol(var curCol : Integer);
    function estAffichable(test : string) : Boolean	;
    function AfficheValeursNumeriques(test : string) : Boolean;
     procedure RemiseAZeroAffichage;
     procedure RemiseAZeroFicheDesignation;
     procedure RemiseAZeroMiseEnValeur;
     procedure RemiseAZeroFicheChimique;
     procedure RemiseAZeroFicheMeca;
     
    {------------------------------  variables  ----------------------------------}
    var
       ValeurNumeriqueCritereAvant : LongInt;
     
    {=============================================================================}
    {=============================================================================}
     
     
    implementation
    uses Unit2, Erreurba, Saisides, Fichdes, Saisinor, Saisidur, Saisires, Saisiela
         ,Fichchi, Fichmeca, Util, Erreval, FinDonne, Sousrech, Stringal;
     
    {*****************************************************************************
    In:
    Out:
    Description: Affiche les valeurs trouvées dans les différentes fiches
    ******************************************************************************}
    procedure AfficheValeurs(AAfficher : Alliage; Demande : string; Champ : Integer; TypeRequete : Integer);
    begin
           RemiseAZeroAffichage;
           AfficheDesignations(AAfficher, Demande, Champ, TypeRequete);
           AfficheProprietesMecaniques(AAfficher);
           AfficheProprietesChimiques(AAfficher);
     
    end;
     
    {*****************************************************************************
    In:  L'alliage à traiter
    Out:
    Description: Affioche les designations de l'alliage
    ******************************************************************************}
    procedure AfficheDesignations(AAfficher : Alliage; Demande : string; Champ : Integer;TypeRequete : Integer);
    begin
         AlliageDesignation1.AfnorRep.Caption := Copy(AAfficher.Afnor, 1, TAILLE_DESIGNATION_INT);
         AlliageDesignation1.WerkstoffRep.Caption := Copy(AAfficher.Werkstoff, 1, TAILLE_DESIGNATION_INT);
         AlliageDesignation1.DINRep.Caption := Copy(AAfficher.Din, 1, TAILLE_DESIGNATION_INT);
         AlliageDesignation1.BSRep.Caption := Copy(AAfficher.Bs, 1, TAILLE_DESIGNATION_INT);
         AlliageDesignation1.AISIRep.Caption := Copy(AAfficher.Aisi, 1, TAILLE_DESIGNATION_INT);
         AlliageDesignation1.UNSRep.Caption := Copy(AAfficher.Uns, 1, TAILLE_DESIGNATION_INT);
         AlliageDesignation1.NatureRep.Caption := Copy(AAfficher.Nature, 1, TAILLE_DESIGNATION_INT);
         AlliageDesignation1.Des1Rep.Caption := Copy(AAfficher.Design1, 1, TAILLE_DESIGNATION_INT);
         AlliageDesignation1.Des2Rep.Caption := Copy(AAfficher.Design2, 1, TAILLE_DESIGNATION_INT);
         AlliageDesignation1.Des3Rep.Caption := Copy(AAfficher.Design3, 1, TAILLE_DESIGNATION_INT);
         AlliageDesignation1.Des4Rep.Caption := Copy(AAfficher.Design4, 1, TAILLE_DESIGNATION_INT);
         AlliageDesignation1.Des5Rep.Caption := Copy(AAfficher.Design5, 1, TAILLE_DESIGNATION_INT);
     
       case TypeRequete of
       DESIGNATION_INT:;
       DURETE_INT:AfficheValeurDurete(AAfficher, Demande, Champ);
       ELASTICITE_INT:AfficheValeurElasticite(AAfficher, Demande, Champ);
       RESISTANCE_INT:AfficheValeurResistance(AAfficher, Demande, Champ);
       else
       end;
       MiseEnEvidenceRequete(AAfficher, Demande, Champ, TypeRequete);
    end;
     
     
     
    {*****************************************************************************
    In:  L'alliage à traiter  et la string demandee
    Out:
    Description: Met en evidence la valuer de l'alliage demandee
    ******************************************************************************}
      procedure MiseEnEvidenceRequete(AAfficher : Alliage; Demande : string; Champ : Integer; TypeRequete : Integer);
      begin
           if(TypeRequete = DESIGNATION_INT)then
              begin
              AlliageDesignation1.PanelAremplir.Visible := False;
                 case Champ of
                 RANG_AFNOR_INT  :  AlliageDesignation1.PanelAfnor.Color := COULEUR_DE_MISE_EN_VALEUR;
                 RANG_WERKSTOFF_INT : AlliageDesignation1.PanelWerkstoff.Color := COULEUR_DE_MISE_EN_VALEUR;
                 RANG_DIN_INT : AlliageDesignation1.PanelDIN.Color := COULEUR_DE_MISE_EN_VALEUR;
                 RANG_BS_INT : AlliageDesignation1.PanelBS.Color := COULEUR_DE_MISE_EN_VALEUR;
                 RANG_AISI_INT : AlliageDesignation1.PanelAISI.Color := COULEUR_DE_MISE_EN_VALEUR;
                 RANG_UNS_INT : AlliageDesignation1.PanelUns.Color := COULEUR_DE_MISE_EN_VALEUR;
                 RANG_NATURE_INT : AlliageDesignation1.PanelNature.Color := COULEUR_DE_MISE_EN_VALEUR;
                 RANG_DESIGN1_INT : AlliageDesignation1.PanelDes1.Color := COULEUR_DE_MISE_EN_VALEUR;
                 RANG_DESIGN2_INT : AlliageDesignation1.PanelDes2.Color := COULEUR_DE_MISE_EN_VALEUR;
                 RANG_DESIGN3_INT : AlliageDesignation1.PanelDes3.Color := COULEUR_DE_MISE_EN_VALEUR;
                 RANG_DESIGN4_INT : AlliageDesignation1.PanelDes4.Color := COULEUR_DE_MISE_EN_VALEUR;
                 RANG_DESIGN5_INT : AlliageDesignation1.PanelDes5.Color := COULEUR_DE_MISE_EN_VALEUR;
                 else
                     AlliageDesignation1.PanelAremplir.Visible := False;
                 end;
              end
              else{Pas designation}
              begin
                   AlliageDesignation1.PanelAremplir.Visible := True;
                   AlliageDesignation1.PanelARemplir.Color := COULEUR_DE_MISE_EN_VALEUR;
              end;
     
      end;
    {*****************************************************************************
    In:  L'alliage à traiter
    Out:
    Description: Affiche la durete trouvee
    ******************************************************************************}
    procedure AfficheValeurDurete(AAfficher : Alliage; Demande : string; Champ : Integer);
    var
       dur1String : string;
       dur2String : string;
       val1 : real;
       val2 : Real;
    begin
     
         ExtraitValeursNumeriques(AAfficher.Dur1, dur1String);
         ExtraitValeursNumeriques(AAfficher.Dur2, dur2String);
     
         AlliageDesignation1.PanelAremplir.Visible := True;
         AlliageDesignation1.ARemplir.Caption := AFFICHAGE_DURETE_STR;
     
     
    if(demande = '')then
    begin
     
         if(ValeurNumeriqueCritereAvant = VALEUR_NUMERIQUE_NON_INITIALISEE_INT)then
         begin
              val1 := Abs( maStrToInt(dur1String));
              val2 := Abs( maStrToInt(dur2String));
              if(val1 < val2)then
              begin
                   AlliageDesignation1.ARemplirRep.Caption := Copy(AAfficher.Dur1, 1, TAILLE_DURETE_INT);
                   ValeurNumeriqueCritereAvant  := maStrToInt(dur1String);
              end
               else
               begin
               AlliageDesignation1.ARemplirRep.Caption := Copy(AAfficher.Dur2, 1, TAILLE_DURETE_INT);
               ValeurNumeriqueCritereAvant  := maStrToInt(dur2String);
               end;
         end
         else
         begin
              val1 := Abs(ValeurNumeriqueCritereAvant  - maStrToInt(dur1String));
              val2 := Abs(ValeurNumeriqueCritereAvant  - maStrToInt(dur2String));
              if(val1 < val2)then
              begin
                   AlliageDesignation1.ARemplirRep.Caption := Copy(AAfficher.Dur1, 1, TAILLE_DURETE_INT);
                   ValeurNumeriqueCritereAvant  := maStrToInt(dur1String);
              end
               else
               begin
               AlliageDesignation1.ARemplirRep.Caption := Copy(AAfficher.Dur2, 1, TAILLE_DURETE_INT);
               ValeurNumeriqueCritereAvant  := maStrToInt(dur2String);
               end;
         end;
    end
    else
    begin
          val1 := Abs(maStrToInt(demande)  - maStrToInt(dur1String));
         val2 := Abs(maStrToInt(demande)  - maStrToInt(dur2String));
         if(val1 = 0)then
         begin
             AlliageDesignation1.ARemplirRep.Caption := Copy(AAfficher.Dur1, 1, TAILLE_DURETE_INT);
             ValeurNumeriqueCritereAvant  := maStrToInt(dur1String);
         end
         else
         begin
              if(val2 = 0)then
              begin
                   AlliageDesignation1.ARemplirRep.Caption := Copy(AAfficher.Dur2, 1, TAILLE_DURETE_INT);
                   ValeurNumeriqueCritereAvant  := maStrToInt(dur2String);
              end
              else
              begin
                   if(val1 < val2)then
                   begin
                   AlliageDesignation1.ARemplirRep.Caption := Copy(AAfficher.Dur1, 1, TAILLE_DURETE_INT);
                   ValeurNumeriqueCritereAvant  := maStrToInt(dur1String);
                   end
                   else
                   begin
                   AlliageDesignation1.ARemplirRep.Caption := Copy(AAfficher.Dur2, 1, TAILLE_DURETE_INT);
                   ValeurNumeriqueCritereAvant  := maStrToInt(dur2String);
                   end;
              end;
         end;
    end;
    end;
     
    {*****************************************************************************
    In:  L'alliage à traiter
    Out:
    Description: Affiche l'elasticite trouvee
    ******************************************************************************}
    procedure AfficheValeurElasticite(AAfficher : Alliage; Demande : string; Champ : Integer);
    var
       ela1String : string;
       ela2String : string;
       val1 : real;
       val2 : Real;
    begin
     
         ExtraitValeursNumeriques(AAfficher.Elast1,ela1String);
         ExtraitValeursNumeriques(AAfficher.Elast2, ela2String);
         AlliageDesignation1.PanelAremplir.Visible := True;
         AlliageDesignation1.ARemplir.Caption := AFFICHAGE_ELASTICITE_STR;
     
     
    if(demande = '')then
    begin
         val1 := Abs(ValeurNumeriqueCritereAvant  - maStrToInt(ela1String));
         val2 := Abs(ValeurNumeriqueCritereAvant  - maStrToInt(ela2String));
         if(val1 < val2)then
         begin
              AlliageDesignation1.ARemplirRep.Caption := Copy(AAfficher.Elast1, 1, TAILLE_ELASTICITE_INT) + UNITE_ELASTICITE_STR;
              ValeurNumeriqueCritereAvant  := maStrToInt(ela1String);
         end
         else
         begin
              AlliageDesignation1.ARemplirRep.Caption := Copy(AAfficher.Elast2, 1, TAILLE_ELASTICITE_INT)+ UNITE_ELASTICITE_STR;
     
              ValeurNumeriqueCritereAvant  := maStrToInt(ela2String);
         end;
    end
    else
    begin
         val1 := Abs(maStrToInt(demande)  - maStrToInt(ela1String));
         val2 := Abs(maStrToInt(demande)  - maStrToInt(ela2String));
     
         if(val1 = 0)then
         begin
             AlliageDesignation1.ARemplirRep.Caption := Copy(AAfficher.Elast1, 1, TAILLE_ELASTICITE_INT)+UNITE_ELASTICITE_STR;
     
             ValeurNumeriqueCritereAvant  := maStrToInt(ela1String);
         end
         else
         begin
              if(val2 = 0)then
              begin
                   AlliageDesignation1.ARemplirRep.Caption := Copy(AAfficher.Elast2, 1, TAILLE_ELASTICITE_INT)
                                                           + UNITE_ELASTICITE_STR;
     
                      ValeurNumeriqueCritereAvant  := maStrToInt(ela2String);
              end
              else
              begin
                   if(val1 < val2)then
                   begin
                   AlliageDesignation1.ARemplirRep.Caption := Copy(AAfficher.Elast1, 1, TAILLE_ELASTICITE_INT)
                                                           +UNITE_ELASTICITE_STR;
     
                   ValeurNumeriqueCritereAvant  := maStrToInt(ela1String);
                   end
                   else
                   begin
                   AlliageDesignation1.ARemplirRep.Caption := Copy(AAfficher.Elast2, 1, TAILLE_ELASTICITE_INT)
                                                           +UNITE_ELASTICITE_STR;
     
                   ValeurNumeriqueCritereAvant  := maStrToInt(ela2String);
                   end;
              end;
         end;
    end;
    end;
     
     
     
    {*****************************************************************************
    In:  L'alliage à traiter
    Out:
    Description: Affiche la resistance
    ******************************************************************************}
    procedure AfficheValeurResistance(AAfficher : Alliage; Demande : string; Champ : Integer);
    var
       min : Integer;
       max : Integer;
       res11 : string;
       res12 : string;
       res21 : string;
       res22 : string;
       res1 : String;
       res2 : String;
       res3 : String;
       res4 : String;
       res11Int : Integer;
       res12Int : Integer;
       res21Int : Integer;
       res22Int : Integer;
       i : Integer;
       Chaine : String;
     
    begin
     
         min := MAX_INT;
         max := MIN_INT;
         res1[0] :=   chr(254);
         res2[0] :=   chr(254);
         res3[0] :=   chr(254);
         res4[0] :=   chr(254);
     
         for i := 1 to TAILLE_RESISTANCE_INT do
         begin
              res1[i] := AAfficher.Resist11[i];
              res2[i] := AAfficher.Resist12[i];
              res3[i] := AAfficher.Resist21[i];
              res4[i] := AAfficher.Resist22[i];
         end;
         res1 := Copy(res1, 1, TAILLE_RESISTANCE_INT);
         res2 := Copy(res2, 1, TAILLE_RESISTANCE_INT);
         res3 := Copy(res3, 1, TAILLE_RESISTANCE_INT);
         res4 := Copy(res4, 1, TAILLE_RESISTANCE_INT);
         ChangeSaisieNumerique(res1, res11);
         res11Int  := MaStrToInt(res11);
         ChangeSaisieNumerique(res2, res12);
         res12Int  := MaStrToInt(res12);
          ChangeSaisieNumerique(res3, res21);
         res21Int  := MaStrToInt(res21);
          ChangeSaisieNumerique(res4, res22);
         res22Int  := MaStrToInt(res22);
     
         if(res11Int <> 0)then
         begin
              min := res11Int;
              max := res11Int;
         end ;
         if(res12Int <> 0)then
         begin
              if(res12Int < min)then
              begin
                   min := res12Int;
              end ;
              if(res12Int > max)then
              begin
                   max := res12Int;
              end ;
         end;
     
         if(res21Int <> 0)then
         begin
              if(res21Int < min)then
              begin
                   min := res21Int;
              end ;
              if(res21Int > max)then
              begin
                   max := res21Int;
              end ;
         end;
         if(res22Int <> 0)then
         begin
              if(res22Int < min)then
              begin
                   min := res22Int;
              end ;
              if(res22Int > max)then
              begin
                   max := res22Int;
              end ;
         end;
     
          if(Min <> MAX_INT)then
          begin
                AlliageDesignation1.PanelAremplir.Visible := True;
                AlliageDesignation1.ARemplir.Caption := AFFICHAGE_RESISTANCE_STR;
                MiseEnFormeChaineResistance(min, max,  Chaine);
                AlliageDesignation1.ARemplirRep.Caption := Chaine;
          end
          else
          begin
                AlliageDesignation1.PanelAremplir.Visible := False;
          end;
    end;
     
     
     
    {*****************************************************************************
    In:
    Out:
    Description: pour l'ahffichage sur la fenetre de designation
    ******************************************************************************}
    procedure MiseEnFormeChaineResistance(min : Integer; max : Integer; var Chaine : String);
    var
       res : String;
    begin
         res := 'De ';
         res := concat(res, IntToStr(min));
         res := concat(res, ' à ');
         res := concat(res, IntToStr(max));
         res := concat(res, ' Mpa');
         Chaine := res;
    end;
     
    {*****************************************************************************
    In:  L'alliage à traiter
    Out:
    Description: Affiche les proprietes chimiques de l'alliage
    ******************************************************************************}
    procedure AfficheProprietesChimiques(AAfficher : Alliage);
    var
       partie : Integer;
       curLine : Integer;
       curCol : Integer ;
    begin
         partie := 1;
         curLine := 1;
         curCol := NUM_COL_ELT1;
     
         FicheChimique1.DensiteTrouvee.Caption := Copy(AAfficher.Densi, 1, TAILLE_DENSITE_INT);
         FicheChimique1.Observation.Caption := Copy(AAfficher.Autre, 1, TAILLE_AUTRE_INT);
     
     
     
       if(estAffichable(AAfficher.C1_) or estAffichable(AAfficher.C1))then
       begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] := C1;
            MiseAJourCol(curCol);
            if(estAffichable(AAfficher.C1_))then
            begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] := Copy(AAfficher.C1_, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
            end;
            MiseAJourCol(curCol);
            if(estAffichable(AAfficher.C1))then
            begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] := Copy(AAfficher.C1, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
            end;
            MiseAJour(curLine, curCol, partie);
       end;
     
     
       if(estAffichable(AAfficher.SI_) or estAffichable(AAfficher.SI))then
       begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] := SI;
            MiseAJourCol(curCol);
            if(estAffichable(AAfficher.SI_))then
            begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] :=  Copy(AAfficher.SI_, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
            end;
            MiseAJourCol(curCol);
            if(estAffichable(AAfficher.SI))then
            begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] :=  Copy(AAfficher.SI, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
            end;
            MiseAJour(curLine, curCol, partie);
       end;
     
        if(estAffichable(AAfficher.MN_) or estAffichable(AAfficher.MN))then
       begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] := MN;
            MiseAJourCol(curCol);
            if(estAffichable(AAfficher.MN_))then
            begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] := Copy(AAfficher.MN_, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
            end;
            MiseAJourCol(curCol);
            if(estAffichable(AAfficher.MN))then
            begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] := Copy(AAfficher.MN, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
            end;
            MiseAJour(curLine, curCol, partie);
       end;
     
        if(estAffichable(AAfficher.P1_) or estAffichable(AAfficher.P1))then
       begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] := P1;
            MiseAJourCol(curCol);
            if(estAffichable(AAfficher.P1_))then
            begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] :=  Copy(AAfficher.P1_, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
            end;
            MiseAJourCol(curCol);
            if(estAffichable(AAfficher.P1))then
            begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] :=  Copy(AAfficher.P1, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
            end;
            MiseAJour(curLine, curCol, partie);
       end;
     
        if(estAffichable(AAfficher.S1_) or estAffichable(AAfficher.S1))then
       begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] := S1;
            MiseAJourCol(curCol);
            if(estAffichable(AAfficher.S1_))then
            begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] :=  Copy(AAfficher.S1_, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
            end;
            MiseAJourCol(curCol);
            if(estAffichable(AAfficher.S1))then
            begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] :=  Copy(AAfficher.S1, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
            end;
            MiseAJour(curLine, curCol, partie);
       end;
     
        if(estAffichable(AAfficher.CR_) or estAffichable(AAfficher.CR))then
       begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] := CR;
            MiseAJourCol(curCol);
            if(estAffichable(AAfficher.CR_))then
            begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] := Copy(AAfficher.CR_, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
            end;
            MiseAJourCol(curCol);
            if(estAffichable(AAfficher.CR))then
            begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] := Copy(AAfficher.CR, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
            end;
            MiseAJour(curLine, curCol, partie);
       end;
     
        if(estAffichable(AAfficher.MO_) or estAffichable(AAfficher.MO))then
       begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] := MO;
            MiseAJourCol(curCol);
            if(estAffichable(AAfficher.MO_))then
            begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] :=  Copy(AAfficher.MO_, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
            end;
            MiseAJourCol(curCol);
            if(estAffichable(AAfficher.MO))then
            begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] :=  Copy(AAfficher.MO, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
            end;
            MiseAJour(curLine, curCol, partie);
       end;
     
        if(estAffichable(AAfficher.NI_) or estAffichable(AAfficher.NI))then
       begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] := NI;
            MiseAJourCol(curCol);
            if(estAffichable(AAfficher.NI_))then
            begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] :=  Copy(AAfficher.NI_, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
            end;
            MiseAJourCol(curCol);
            if(estAffichable(AAfficher.NI))then
            begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] :=  Copy(AAfficher.NI, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
            end;
            MiseAJour(curLine, curCol, partie);
       end;
     
        if(estAffichable(AAfficher.V1_) or estAffichable(AAfficher.V1))then
       begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] := V1;
            MiseAJourCol(curCol);
            if(estAffichable(AAfficher.V1_))then
            begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] :=  Copy(AAfficher.V1_, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
            end;
            MiseAJourCol(curCol);
            if(estAffichable(AAfficher.V1))then
            begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] :=  Copy(AAfficher.V1, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
            end;
            MiseAJour(curLine, curCol, partie);
       end;
     
       if(estAffichable(AAfficher.AL_) or estAffichable(AAfficher.AL))then
       begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] := AL;
            MiseAJourCol(curCol);
            if(estAffichable(AAfficher.AL_))then
            begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] := Copy(AAfficher.AL_, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
            end;
            MiseAJourCol(curCol);
            if(estAffichable(AAfficher.AL))then
            begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] := Copy(AAfficher.AL, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
            end;
            MiseAJour(curLine, curCol, partie);
       end;
     
         if(estAffichable(AAfficher.CU_) or estAffichable(AAfficher.CU))then
       begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] := CU;
            MiseAJourCol(curCol);
            if(estAffichable(AAfficher.CU_))then
            begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] := Copy(AAfficher.CU_, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
            end;
            MiseAJourCol(curCol);
            if(estAffichable(AAfficher.CU))then
            begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] := Copy(AAfficher.CU, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
            end;
            MiseAJour(curLine, curCol, partie);
       end;
     
     
        if(estAffichable(AAfficher.TI_) or estAffichable(AAfficher.TI))then
       begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] := TI;
            MiseAJourCol(curCol);
            if(estAffichable(AAfficher.TI_))then
            begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] :=  Copy(AAfficher.TI_, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
            end;
            MiseAJourCol(curCol);
            if(estAffichable(AAfficher.TI))then
            begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] :=  Copy(AAfficher.TI, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
            end;
            MiseAJour(curLine, curCol, partie);
       end;
     
        if(estAffichable(AAfficher.CO_) or estAffichable(AAfficher.CO))then
       begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] := CO;
            MiseAJourCol(curCol);
            if(estAffichable(AAfficher.CO_))then
            begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] := Copy(AAfficher.CO_, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
            end;
            MiseAJourCol(curCol);
            if(estAffichable(AAfficher.CO))then
            begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] := Copy(AAfficher.CO, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
            end;
            MiseAJour(curLine, curCol, partie);
       end;
       if(estAffichable(AAfficher.W1_) or estAffichable(AAfficher.W1))then
       begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] := W1;
            MiseAJourCol(curCol);
            if(estAffichable(AAfficher.W1_))then
            begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] :=  Copy(AAfficher.W1_, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
            end;
            MiseAJourCol(curCol);
            if(estAffichable(AAfficher.W1))then
            begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] :=  Copy(AAfficher.W1, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
            end;
            MiseAJour(curLine, curCol, partie);
       end;
       if(estAffichable(AAfficher.NB_) or estAffichable(AAfficher.NB))then
       begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] := NB;
            MiseAJourCol(curCol);
            if(estAffichable(AAfficher.NB_))then
            begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] :=  Copy(AAfficher.NB_, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
            end;
            MiseAJourCol(curCol);
            if(estAffichable(AAfficher.NB))then
            begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] :=  Copy(AAfficher.NB, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
            end;
            MiseAJour(curLine, curCol, partie);
       end;
     
       if(estAffichable(AAfficher.AZ_) or estAffichable(AAfficher.AZ))then
       begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] := AZ;
            MiseAJourCol(curCol);
            if(estAffichable(AAfficher.AZ_))then
            begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] := Copy(AAfficher.AZ_, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
            end;
            MiseAJourCol(curCol);
            if(estAffichable(AAfficher.AZ))then
            begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] := Copy(AAfficher.AZ, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
            end;
            MiseAJour(curLine, curCol, partie);
       end;
     
     
       if(estAffichable(AAfficher.FE_) or estAffichable(AAfficher.FE))then
       begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] := FE;
            MiseAJourCol(curCol);
            if(estAffichable(AAfficher.FE_))then
            begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] := Copy(AAfficher.FE_, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
            end;
            MiseAJourCol(curCol);
            if(estAffichable(AAfficher.FE))then
            begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] := Copy(AAfficher.FE, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
            end;
            MiseAJour(curLine, curCol, partie);
       end;
        if(estAffichable(AAfficher.MG_) or estAffichable(AAfficher.MG))then
       begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] := MG;
            MiseAJourCol(curCol);
            if(estAffichable(AAfficher.MG_))then
            begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] := Copy(AAfficher.MG_, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
            end;
            MiseAJourCol(curCol);
            if(estAffichable(AAfficher.MG))then
            begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] := Copy(AAfficher.MG, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
            end;
            MiseAJour(curLine, curCol, partie);
       end;
     
        if(estAffichable(AAfficher.PB_) or estAffichable(AAfficher.PB))then
       begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] := PB;
            MiseAJourCol(curCol);
            if(estAffichable(AAfficher.PB_))then
            begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] :=  Copy(AAfficher.PB_, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
            end;
            MiseAJourCol(curCol);
            if(estAffichable(AAfficher.PB))then
            begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] :=  Copy(AAfficher.PB, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
            end;
            MiseAJour(curLine, curCol, partie);
       end;
     
     
     
        if(estAffichable(AAfficher.SN_) or estAffichable(AAfficher.SN ))then
       begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] := SN;
            MiseAJourCol(curCol);
            if(estAffichable(AAfficher.SN_))then
            begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] :=  Copy(AAfficher.SN_, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
            end;
            MiseAJourCol(curCol);
            if(estAffichable(AAfficher.SN))then
            begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] :=  Copy(AAfficher.SN, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
            end;
            MiseAJour(curLine, curCol, partie);
       end;
     
     
     
       if(estAffichable(AAfficher.ZN_) or estAffichable(AAfficher.ZN))then
       begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] := ZN;
            MiseAJourCol(curCol);
            if(estAffichable(AAfficher.ZN_))then
            begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] :=  Copy(AAfficher.ZN_, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
            end;
            MiseAJourCol(curCol);
            if(estAffichable(AAfficher.ZN))then
            begin
            FicheChimique1.StringGrid1.Cells[curCol, curLine] :=  Copy(AAfficher.ZN, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
            end;
            MiseAJour(curLine, curCol, partie);
       end;
    end;
     
    {*****************************************************************************
    In:  la ligne courante
    Out:
    Description: met a jour les coordonnes pour l'affichage des propriétés chimiques
    ******************************************************************************}
    function estAffichable(test : string) : Boolean	;
    var
       res : Boolean;
    begin
     if(test = '  .000' )then
         begin
              res := false;
         end
         else
         begin
              res := true;
         end;
         estAffichable := res;
    end;
     
     
    {*****************************************************************************
    In:  la ligne courante
    Out:
    Description: met a jour les coordonnes pour l'affichage des propriétés chimiques
    ******************************************************************************}
    procedure MiseAJour(var curLine : Integer; var curCol : Integer; var partie : Integer);
    begin
         curLine := curLine + 1;
          if (curLine >= NB_LIGNE_MAX_NUM)then
          begin
             curLine := 1;
             curCol := NUM_COL_ELT2;
             partie := 2;
          end
          else
          begin
               if(partie = 1)then
               begin
                    curCol := NUM_COL_ELT1;
               end
               else
               begin
                     curCol := NUM_COL_ELT2;
               end;
          end;
    end;
    {*****************************************************************************
    In:  la colonne courante
    Out:
    Description: met a jour les coordonnes pour l'affichage des propriétés chimiques
    ******************************************************************************}
    procedure MiseAJourCol(var curCol : Integer);
    begin
         curCol := curCol + 1;
    end;
     
    {*****************************************************************************
    In:  L'alliage à traiter
    Out:
    Description: Affiche les proprietes mecaniques de l'alliage
    ******************************************************************************}
    procedure AfficheProprietesMecaniques(AAfficher : Alliage);
    var
       res1 : string;
       res2 : string;
    begin
         AfficheResistance1(AAfficher, res1);
        AfficheResistance2(AAfficher, res2);
        {La fiche mecanique}
       FicheMeca1.StringGrid1.Cells[COL_ETAT_NUM, LIGNE_ETAT1_NUM]:=  Copy(AAfficher.Trt1, 1, TAILLE_ETAT_INT);
       if(AfficheValeursNumeriques(Copy(AAfficher.Temp1, 1, TAILLE_TEMPERATURE1_INT)))then
       begin
       FicheMeca1.StringGrid1.Cells[COL_CHAUFFE_NUM, LIGNE_ETAT1_NUM]:=  Copy(AAfficher.Temp1, 1, TAILLE_TEMPERATURE1_INT);
       end;
       FicheMeca1.StringGrid1.Cells[COL_MPA_NUM, LIGNE_ETAT1_NUM]:=   Copy(res1,1, sizeOf(res1));
       if(AfficheValeursNumeriques(Copy(AAfficher.Elast1, 1, TAILLE_ELASTICITE_INT)))then
       begin
       FicheMeca1.StringGrid1.Cells[COL_MINI_NUM, LIGNE_ETAT1_NUM]:=  Copy(AAfficher.Elast1,1, TAILLE_ELASTICITE_INT);
       end;
       if(AfficheValeursNumeriques(Copy(AAfficher.Allong1, 1, TAILLE_ALLONGEMENT_INT)))then
       begin
       FicheMeca1.StringGrid1.Cells[COL_A_NUM, LIGNE_ETAT1_NUM]:=  Copy(AAfficher.Allong1, 1, TAILLE_ALLONGEMENT_INT);
       end;
       if(AfficheValeursNumeriques(Copy(AAfficher.Dur1, 1, TAILLE_DURETE_INT)))then
       begin
       FicheMeca1.StringGrid1.Cells[COL_DUR_NUM, LIGNE_ETAT1_NUM]:=  Copy(AAfficher.dur1, 1, TAILLE_DURETE_INT);
       end;
     
     
       FicheMeca1.StringGrid1.Cells[COL_ETAT_NUM, LIGNE_ETAT2_NUM]:=  Copy(AAfficher.Trt2, 1, TAILLE_ETAT_INT);
       if(AfficheValeursNumeriques(Copy(AAfficher.Temp2, 1, TAILLE_TEMPERATURE1_INT)))then
       begin
       FicheMeca1.StringGrid1.Cells[COL_CHAUFFE_NUM, LIGNE_ETAT2_NUM]:=  Copy(AAfficher.Temp2, 1, TAILLE_TEMPERATURE1_INT);
       end;
       FicheMeca1.StringGrid1.Cells[COL_MPA_NUM, LIGNE_ETAT2_NUM]:=   Copy(res2,1, sizeOf(res2));
       if(AfficheValeursNumeriques(Copy(AAfficher.Elast2, 1, TAILLE_ELASTICITE_INT)))then
       begin
       FicheMeca1.StringGrid1.Cells[COL_MINI_NUM, LIGNE_ETAT2_NUM]:=  Copy(AAfficher.Elast2,1, TAILLE_ELASTICITE_INT);
       end;
       if(AfficheValeursNumeriques(Copy(AAfficher.Allong2, 1, TAILLE_ALLONGEMENT_INT)))then
       begin
       FicheMeca1.StringGrid1.Cells[COL_A_NUM, LIGNE_ETAT2_NUM]:=  Copy(AAfficher.Allong2, 1, TAILLE_ALLONGEMENT_INT);
       end;
       if(AfficheValeursNumeriques(Copy(AAfficher.Dur2, 1, TAILLE_DURETE_INT)))then
       begin
       FicheMeca1.StringGrid1.Cells[COL_DUR_NUM, LIGNE_ETAT2_NUM]:=  Copy(AAfficher.dur2, 1, TAILLE_DURETE_INT);
       end;
     
       FicheMeca1.StringGrid1.Cells[COL_ETAT_NUM, LIGNE_ETAT3_NUM]:=  Copy(AAfficher.Trt3, 1, TAILLE_ETAT_INT);
       if(AfficheValeursNumeriques(Copy(AAfficher.Temp3, 1, TAILLE_TEMPERATURE2_INT)))then
       begin
       FicheMeca1.StringGrid1.Cells[COL_CHAUFFE_NUM, LIGNE_ETAT3_NUM]:=  Copy(AAfficher.Temp3, 1, TAILLE_TEMPERATURE2_INT);
       end;
    end;
    {*****************************************************************************
    In:  L'alliage à traiter
    Out: la chaine des resistances mini et maxi
    Description: Traite les resistances pour avoir une chaine
    ******************************************************************************}
    procedure AfficheResistance1(AAfficher : Alliage; var Result : String);
    var
       Res : string;
       espace1 : string;
       espace2 : string;
    begin
         res[0] :=   chr(254);
         res := '';
         espace1 := '    ';
         espace2 := '               ';
         if(AfficheValeursNumeriques(Copy(AAfficher.Resist11,1, TAILLE_RESISTANCE_INT )) = True)then
         begin
              Res := Copy(AAfficher.Resist11,1, TAILLE_RESISTANCE_INT) ;
              Res := Res + espace1;
              Res := Res + Copy(AAfficher.Resist12,1, TAILLE_RESISTANCE_INT );
         end
         else
         begin
              if(AfficheValeursNumeriques(Copy(AAfficher.Resist12,1, TAILLE_RESISTANCE_INT )) = True)then
              begin
                   res := espace2 + Copy(AAfficher.Resist12,1, TAILLE_RESISTANCE_INT );
              end
              else
              begin
                   res := '';
              end
         end;
         Result := res;
    end;
     
    {*****************************************************************************
    In:  La string à tester
    Out: Bool
    Description: regarde si la valeur doit etre afficher(valeur non nulle)
    ******************************************************************************}
    function AfficheValeursNumeriques(test : string) : Boolean;
    var
       res : Boolean;
       temp : Real;
    begin
     
         {$I-}
         try
         if(test = '')then
         begin
              res := False;
         end
         else
             begin
             if(QueDesBlancs(test)= True) then
             begin
                   res := False;
             end
             else
             begin
                  temp := StrToFloat(test);
                  if(IOResult <> 0 )then
                  begin
                       raise Exception.Create('Conversion : ce n''est pas un float');
                  end
                  else
                  begin
                       if(temp <> 0) then
                       begin
                             res := True;
                       end
                       else
                       begin
                           res := False;
                       end;{temp <> 0}
                  end;
              end;{QueDesBlancs}
         end;
         {Fin de test <> ''}
    except
             res := True;
    end;
    {$I+}
    AfficheValeursNumeriques := res;
    end;
     
     
    {*****************************************************************************
    In:  L'alliage à traiter
    Out: la chaine des resistances mini et maxi
    Description: Traite les resistances pour avoir une chaine
    ******************************************************************************}
    procedure AfficheResistance2(AAfficher : Alliage; var Result : String);
    var
       Res : string;
       espace1 : string;
       espace2 : string;
    begin
         res[0] :=   chr(254);
         res := '';
         espace1 := '    ';
         espace2 := '               ';
         if(AfficheValeursNumeriques(Copy(AAfficher.Resist21,1, TAILLE_RESISTANCE_INT )) = True)then
         begin
              Res := Copy(AAfficher.Resist21,1, TAILLE_RESISTANCE_INT ) ;
              Res := Res + espace1;
              Res := Res + Copy(AAfficher.Resist22,1, TAILLE_RESISTANCE_INT );
         end
         else
         begin
              if(AfficheValeursNumeriques(Copy(AAfficher.Resist22,1, TAILLE_RESISTANCE_INT )) = True)then
              begin
                   res := espace2 + Copy(AAfficher.Resist22,1, TAILLE_RESISTANCE_INT );
              end
              else
              begin
                   res := '';
              end
         end;
         Result := res;
    end;
     
    {******************************************************************************
    In:
    Out:
    Description: remet à zero les fiches d'affichage
    ******************************************************************************}
     procedure RemiseAZeroAffichage;
     begin
          RemiseAZeroMiseEnValeur;
          RemiseAZeroFicheDesignation;
          RemiseAZeroFicheChimique;
          RemiseAZeroFicheMeca;
     
     end;
    {******************************************************************************
    In:
    Out:
    Description: remet à zero les mises en valeur des designations
    ******************************************************************************}
    procedure RemiseAZeroFicheDesignation;
      begin
           AlliageDesignation1.AfnorRep.Caption := '';
           AlliageDesignation1.WerkstoffRep.Caption := '';
           AlliageDesignation1.DINRep.Caption := '';
           AlliageDesignation1.BSRep.Caption := '';
           AlliageDesignation1.AISIRep.Caption := '';
           AlliageDesignation1.UNSRep.Caption := '';
           AlliageDesignation1.NatureRep.Caption := '';
           AlliageDesignation1.Des1Rep.Caption := '';
           AlliageDesignation1.Des2Rep.Caption := '';
           AlliageDesignation1.Des3Rep.Caption := '';
           AlliageDesignation1.Des4Rep.Caption := '';
           AlliageDesignation1.Des5Rep.Caption := '';
      end;
     
    {******************************************************************************
    In:
    Out:
    Description: remet à zero les mises en valeur des designations
    ******************************************************************************}
     procedure RemiseAZeroMiseEnValeur;
     begin
          AlliageDesignation1.PanelAfnor.Color := COULEUR_DE_NON_MISE_EN_VALEUR;
          AlliageDesignation1.PanelWerkstoff.Color := COULEUR_DE_NON_MISE_EN_VALEUR;
          AlliageDesignation1.PanelDIN.Color := COULEUR_DE_NON_MISE_EN_VALEUR;
          AlliageDesignation1.PanelBS.Color := COULEUR_DE_NON_MISE_EN_VALEUR;
          AlliageDesignation1.PanelAISI.Color := COULEUR_DE_NON_MISE_EN_VALEUR;
          AlliageDesignation1.PanelUns.Color := COULEUR_DE_NON_MISE_EN_VALEUR;
          AlliageDesignation1.Panelnature.Color := COULEUR_DE_NON_MISE_EN_VALEUR;
          AlliageDesignation1.PanelDes1.Color := COULEUR_DE_NON_MISE_EN_VALEUR;
          AlliageDesignation1.PanelDes2.Color := COULEUR_DE_NON_MISE_EN_VALEUR;
          AlliageDesignation1.PanelDes3.Color := COULEUR_DE_NON_MISE_EN_VALEUR;
          AlliageDesignation1.PanelDes4.Color := COULEUR_DE_NON_MISE_EN_VALEUR;
         AlliageDesignation1.PanelDes5.Color := COULEUR_DE_NON_MISE_EN_VALEUR;
          AlliageDesignation1.PanelARemplir.Color := COULEUR_DE_NON_MISE_EN_VALEUR;
     
     end;
    {******************************************************************************
    In:
    Out:
    Description: remet à zero les  propriétés chimiques de l'alliage
    ******************************************************************************}
    procedure RemiseAZeroFicheChimique;
    var
       i : Integer;
       j : Integer;
    begin
         for i := 0 to  NB_COL_INT do
         begin
              for j := 1 to NB_LIGN_INT do
              begin
                   FicheChimique1.StringGrid1.Cells[i, j]:= '';
              end;
         end;
     
    end;
     
    {******************************************************************************
    In:
    Out:
    Description: remet à zero les  propriétés meca de l'alliage
    ******************************************************************************}
    procedure RemiseAZeroFicheMeca;
    var
       i : Integer;
       j : Integer;
    begin
         for i := 1 to  NB_COL_MECA_INT do
         begin
              for j := 0 to NB_LIGNES_MECA_INT do
              begin
                   FicheMeca1.StringGrid1.Cells[i, j]:= '';
              end;
         end;
     
    end;
    end.

  4. #4
    Expert éminent sénior
    Avatar de ShaiLeTroll
    Homme Profil pro
    Développeur C++\Delphi
    Inscrit en
    Juillet 2006
    Messages
    13 665
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 43
    Localisation : France, Seine Saint Denis (Île de France)

    Informations professionnelles :
    Activité : Développeur C++\Delphi
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juillet 2006
    Messages : 13 665
    Points : 25 459
    Points
    25 459
    Par défaut
    à la place de

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
         res1[0] :=   chr(254);
         res2[0] :=   chr(254);
         res3[0] :=   chr(254);
         res4[0] :=   chr(254);
     
         for i := 1 to TAILLE_RESISTANCE_INT do
         begin
              res1[i] := AAfficher.Resist11[i];
              res2[i] := AAfficher.Resist12[i];
              res3[i] := AAfficher.Resist21[i];
              res4[i] := AAfficher.Resist22[i];
         end;
         res1 := Copy(res1, 1, TAILLE_RESISTANCE_INT);
         res2 := Copy(res2, 1, TAILLE_RESISTANCE_INT);
         res3 := Copy(res3, 1, TAILLE_RESISTANCE_INT);
         res4 := Copy(res4, 1, TAILLE_RESISTANCE_INT);
    si conserve le type string, essaye tout simplement

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
              res1 := AAfficher.Resist11;
              res2 := AAfficher.Resist12;
              res3 := AAfficher.Resist21;
              res4 := AAfficher.Resist22;
    partout où il y a le type string, tu dois essayer de comprendre le code, la plupart du temps, conserver string sera possible !
    Dans quelques cas dans l'utilisation de file of record, tu devras passer en ShortString équivalent de string[255]à l'époque [0] contenait la longueur de la chaine, le 1èr caractère étant [1]

    déjà quand je vois ça dans un code, ça m'inquiète !

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
             if(temp <> 0) then
                       begin
                             res := True;
                       end
                       else
                       begin
                           res := False;
                       end;{temp <> 0}
    cela s'écrit

    On peut penser qu'il y a plein de code inutilement complexe dans ce programme qui vont te rendre la tache plus pénible, surtout si tu n'es pas programmeur !



    Tu devrais embaucher un développeur Delphi FreeLance pour mettre à jour ton programme, même pour l'époque, il semble qu'il a été ÉTRANGEMENT programmé (il est vrai que Delphi 1 avait de nombreuses lacunes)

    il semble que AlliageDesignation1 soit une variable globale, très mauvaise pratique pour manipuler un TForm !

    Delphi 3 pense que cela date de 1997 (environ) ... il y a Delphi 16 (XE2) !
    Investir du temps dans une migration Delphi 1 à 3, est-ce utile et pérenne ?
    Tu n'as pas le choix ? c'est à titre privé ? professionnel ?
    si privé, bon courage !
    si professionnel, il faut prévoir un vrai budget migration !

    Regarde une version Starter, une centaine d'euros pour 14 ans d'évolution !

  5. #5
    Nouveau Candidat au Club
    Homme Profil pro
    gestionnaire base de données
    Inscrit en
    Décembre 2011
    Messages
    5
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : gestionnaire base de données

    Informations forums :
    Inscription : Décembre 2011
    Messages : 5
    Points : 1
    Points
    1
    Par défaut suite
    D'abord merci beaucoup pour votre aide ShaiLeTroll.
    J'ai appliqué vos recommandations, il reste plus que deux erreurs mettant en jeu semble-t-il res [0] := (soit la même erreur)
    J'essaie de comprendre mais nous avons la présence de res [0] := et de res :=, mais qu'appellent-ils?

    Pour répondre à votre question, j'ai crée ce produit il y a 16 ans avec une étudiante. Il me permet de vivre avec un petit salaire de
    travailleur indépendant. Bien sur que l'idéal serait de le remanier "genre 128bits pour être tranquille", mais si avec cette histoire de 64bits
    je ne peux plus le vendre à présent, je ne pourrai rien envisager du tout.


  6. #6
    Expert éminent sénior
    Avatar de ShaiLeTroll
    Homme Profil pro
    Développeur C++\Delphi
    Inscrit en
    Juillet 2006
    Messages
    13 665
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 43
    Localisation : France, Seine Saint Denis (Île de France)

    Informations professionnelles :
    Activité : Développeur C++\Delphi
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juillet 2006
    Messages : 13 665
    Points : 25 459
    Points
    25 459
    Par défaut
    Évite les copies d’écran, même si tu les héberges sur ton site, colle le code en texte dans des balises
    Idem, les erreurs, tu peux les écrire dans un fichier et nous copier le texte !

    Avec le string de Delphi 3, supprimes tous les [0], cela n'existe plus et même à l'époque, c'était déjà une vilaine bidouille !

    cela dit que la chaine fait 254 caractères mais ensuite
    cela dit que la chaine fait 0 caractères, donc l'étape au dessus était inutile !

  7. #7
    Membre confirmé
    Homme Profil pro
    Santé
    Inscrit en
    Septembre 2010
    Messages
    290
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Nord (Nord Pas de Calais)

    Informations professionnelles :
    Activité : Santé
    Secteur : Santé

    Informations forums :
    Inscription : Septembre 2010
    Messages : 290
    Points : 534
    Points
    534
    Par défaut
    Citation Envoyé par engivalhp Voir le message
    J'ai appliqué vos recommandations, il reste plus que deux erreurs mettant en jeu semble-t-il res [0] := (soit la même erreur)
    J'essaie de comprendre mais nous avons la présence de res [0] := et de res :=, mais qu'appellent-ils?
    Comme dit Shai, "res [0] :=" ne sert à rien et ne devrait être utilisé qu'en lecture seule. "res [0]", c'est le nombre de caractères assignés dans la chaîne.

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
     
      var S : String[4];
      begin
      S := 'ABC';
      Edit1.Text := IntToStr(Length(S)   );// -> 3  Nombre de caractères assignés.
      Edit2.Text := IntToStr(Ord   (S[0]));// -> 3  Nombre de caractères assignés.
      Edit3.Text := IntToStr(High  (S)   );// -> 4  Nombre maxi de caractères.
     
      Memo1.Lines.Add(IntToStr(Ord(S[0])));// -> 3
      Memo1.Lines.Add(S[1]);               // -> A
      Memo1.Lines.Add(S[2]);               // -> B
      Memo1.Lines.Add(S[3]);               // -> C
      Memo1.Lines.Add(S[4]);               // -> Ne fait rien. Ce n'est pas '' !
      Memo1.Lines.Add('FIN');              // -> FIN

  8. #8
    Nouveau Candidat au Club
    Homme Profil pro
    gestionnaire base de données
    Inscrit en
    Décembre 2011
    Messages
    5
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : gestionnaire base de données

    Informations forums :
    Inscription : Décembre 2011
    Messages : 5
    Points : 1
    Points
    1
    Par défaut
    Voila, j'ai enlevé les [0] je suis passé sur une autre page de code qui s'appelle
    STRINGAL.PAS

    çà bloque à procedure ChangeSaisie
    ligne
    122 la variable 'res' est déclarée mais jamais utilisée dans 'changesaisie'
    172 la variable 'test' est déclarée mais jamais utilisée dans 'changesaisienumerique'
    203 la variable 'test' est déclarée mais jamais utilisée dans 'extraitvaleursnumeriques'
    234 la variable 'indicenonespace' est déclarée mais jamais utilisée dans 'extraitvaleurs'
    235 la variable 'espacetrouve' est déclarée mais jamais utilisée dans 'extraitvaleurs'
    237 la variable 'test' est déclarée mais jamais utilisée dans 'extraitvaleurs'
    avertissement: la variable 'res' peut-etre pas déclarée

    puis ligne 775 a 788
    les types des paramètreS VAR originaux et formels doivent être identiques

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    434
    435
    436
    437
    438
    439
    440
    441
    442
    443
    444
    445
    446
    447
    448
    449
    450
    451
    452
    453
    454
    455
    456
    457
    458
    459
    460
    461
    462
    463
    464
    465
    466
    467
    468
    469
    470
    471
    472
    473
    474
    475
    476
    477
    478
    479
    480
    481
    482
    483
    484
    485
    486
    487
    488
    489
    490
    491
    492
    493
    494
    495
    496
    497
    498
    499
    500
    501
    502
    503
    504
    505
    506
    507
    508
    509
    510
    511
    512
    513
    514
    515
    516
    517
    518
    519
    520
    521
    522
    523
    524
    525
    526
    527
    528
    529
    530
    531
    532
    533
    534
    535
    536
    537
    538
    539
    540
    541
    542
    543
    544
    545
    546
    547
    548
    549
    550
    551
    552
    553
    554
    555
    556
    557
    558
    559
    560
    561
    562
    563
    564
    565
    566
    567
    568
    569
    570
    571
    572
    573
    574
    575
    576
    577
    578
    579
    580
    581
    582
    583
    584
    585
    586
    587
    588
    589
    590
    591
    592
    593
    594
    595
    596
    597
    598
    599
    600
    601
    602
    603
    604
    605
    606
    607
    608
    609
    610
    611
    612
    613
    614
    615
    616
    617
    618
    619
    620
    621
    622
    623
    624
    625
    626
    627
    628
    629
    630
    631
    632
    633
    634
    635
    636
    637
    638
    639
    640
    641
    642
    643
    644
    645
    646
    647
    648
    649
    650
    651
    652
    653
    654
    655
    656
    657
    658
    659
    660
    661
    662
    663
    664
    665
    666
    667
    668
    669
    670
    671
    672
    673
    674
    675
    676
    677
    678
    679
    680
    681
    682
    683
    684
    685
    686
    687
    688
    689
    690
    691
    692
    693
    694
    695
    696
    697
    698
    699
    700
    701
    702
    703
    704
    705
    706
    707
    708
    709
    710
    711
    712
    713
    714
    715
    716
    717
    718
    719
    720
    721
    722
    723
    724
    725
    726
    727
    728
    729
    730
    731
    732
    733
    734
    735
    736
    737
    738
    739
    740
    741
    742
    743
    744
    745
    746
    747
    748
    749
    750
    751
    752
    753
    754
    755
    756
    757
    758
    759
    760
    761
    762
    763
    764
    765
    766
    767
    768
    769
    770
    771
    772
    773
    774
    775
    776
    777
    778
    779
    780
    781
    782
    783
    784
    785
    786
    787
    788
    789
    790
    791
    792
    793
    794
    795
    796
    797
    798
    799
    800
    801
    802
    803
    804
    805
    806
    807
    808
    809
    810
    811
    812
    813
    814
    815
    816
    817
    818
    819
    820
    821
    822
    823
    824
    825
    826
    827
    828
    829
    830
    831
    832
    833
     
    {=============================================================================
    // File:                           StringAl.pas
    //-----------------------------------------------------------------------------
    // Description:  Les fonction de gestion de string pour le traitement des
        alliages
    // Authors: CHALIER Sandrine
    // Version:                             1.0.0
    // Created on:                          24/07/2002
    // Lately updated on:                   24/07/2002
    //-----------------------------------------------------------------------------
    //                                  History
    //_____________________________________________________________________________
    //  Version |   Date   |       Author        |             Updates
    //----------+----------+---------------------+---------------------------------
    //   1.0.0  | 24/07/02 |    Chalier          | creation of the file
    //
    //
    //============================================================================}
     
    unit Stringal;
    {=============================================================================}
    {=============================================================================}
    interface
    {-----------------------------------  Uses  ----------------------------------}
    uses StdCtrls, Forms,Classes, SysUtils, Graphics, Requete, ShellApi,winprocs;
    {--------------------------------  Constantes  -------------------------------}
     
     {-----------------------------------  Types  ---------------------------------}
     
    {--------------------------------  Procedures  -------------------------------}
    function MaStrToInt(Buf : String) : LongInt;
    function MaStrToFloat(Buf : String) : Extended ;
    procedure ChangeSaisie(saisie : string; var Result : String);
    procedure ExtraitValeurs(Buf : String; var Classification : Integer; var Index : String;
               var Enregistrement : LongInt ; var Champ : Integer);
    procedure ExtraitCoordonneesNumeriques(reste : String ; var Enregistrement : LongInt ; var Champ : Integer);
    function estIndexDesignation(Buf : string) : Boolean;
    function estIndexDurete(Buf : string) : Boolean;
    function estIndexElasticite(Buf : string) : Boolean;
    function estIndexResistance(Buf : string) : Boolean;
    procedure Majuscule(saisie : string; var Result : String);
    function BonCritereResistance(Buf : string;
              Demande : LongInt;
              Delta : LongInt;
              var index : string;
               var Classification : Integer;
               var Enregistrement : LongInt;
                var Champ : Integer) : Boolean;
    function TraiteAlliageTypeInconnu(Buf1 : String;
              var Classification : Integer;
              var index : String;
              var Enregistrement : LongInt;
              var Champ : Integer;
              DemandeEntier : LongInt;
              DeltaEntier : LongInt):Boolean;
    procedure ChangeSaisieNumerique(var saisie : string; var Result : String);
    function SousRechercheTrouvee(Classification : Integer): Boolean;
    function estBonCritereDeRecherche(Buf : string; ModeRecherche : Integer) : Boolean;
    procedure InitialisationAlliage(var AInitialiser : Alliage);
    procedure ExtraitValeursNumeriques(saisie : string; var Result : String);
    function CorrigeLecture(var Trouve : Alliage): Alliage;
    procedure CorrigeString(var Trouve : String);
     
    implementation
    uses Erreurge,Unit2, Saisinor, Saisides, Apropos, Unit3,Annote,Util,
         Saisidur, Saisires, Saisiela, Erreurli, Fichdes, Erreurba, Quitter, AfficheA;
     
     
    {******************************************************************************
    In:La string et les deux indices extremes
    Out:
    Description: Copie une chaine
    *******************************************************************************}
    function MaStrToInt(Buf : String) : LongInt ;
    var res : LongInt;
    begin
         if(Buf = '')then
         begin
              res := 0;
         end
         else
         begin
              res := StrToIntDef(Buf, 0);
         end;
     
         MaStrToInt := res;
     
    end;
     
     
    {******************************************************************************
    In:La string et les deux indices extremes
    Out:
    Description: Convertion des chaines
    *******************************************************************************}
    function MaStrToFloat(Buf : String) : Extended ;
    var res : Extended;
    begin
    try
         if(Buf = '')then
         begin
              res := 0;
         end
         else
         begin
               res := StrToFloat(Buf);
         end;
     
    except
          res := 0;
    end;
    MaStrToFloat := res;
    end;
    {******************************************************************************
    In:
    Out:
    Description: met sous la bonne forme la saisie
    ******************************************************************************}
    procedure ChangeSaisie(saisie : string; var Result : String);
    var i : Integer;
        j : Integer;
        res : string;
        test : string;
    begin
         test := chr(254);
         j := 1;
        for i := 1 to Length(saisie)do
        begin
             if(isLetter(saisie[i]) or isNumber(saisie[i]) or isTilde(saisie[i]))then
             begin
                 test[j] := saisie[i];
                 j := j + 1;
             end;
        end;
         test[j] := #0 ;
     
        test := Copy(test, 1, j - 1);
     
        Majuscule(test, Result);
    end;
     
    {******************************************************************************
    In:
    Out:
    Description: met sous la bonne forme la saisie
    ******************************************************************************}
    procedure Majuscule(saisie : string; var Result : String);
    var
       i : Integer;
    begin
     
         Result := saisie;
         for i := 1 to Length(saisie)do
         begin
              if(isLetterMinus(saisie[i]))then
              begin
                   Result[i] := Chr(Ord(saisie[i]) - 32);
              end;
         end;
     
    end;
     
    {******************************************************************************
    In:
    Out:
    Description: met sous la bonne forme la saisie
    ******************************************************************************}
    procedure ChangeSaisieNumerique(var saisie : string; var Result : String);
         var i : Integer;
        j : Integer;
        res : string;
        test : string;
    begin
         j := 1;
         res := chr(254);
        for i := 1 to Length(saisie)do
        begin
             if(isNumber(saisie[i]))then
     
             begin
                 res[j] := saisie[i];
                 j := j + 1;
             end;
        end;
         for i := 1 to (j - 1)do
        begin
            saisie[i] := res[i];
        end;
        saisie := Copy(saisie, 1, j- 1);
     
    Result:= saisie;
    end;
     
    {******************************************************************************
    In:
    Out:
    Description:
    ******************************************************************************}
    procedure ExtraitValeursNumeriques( saisie : string; var Result : String);
    var i : Integer;
        j : Integer;
        res : string;
        test : string;
    begin
         j := 1;
          res := chr(254);
        for i := 1 to Length(saisie)do
        begin
             if(isNumber(saisie[i]))then
     
             begin
                 res[j] := saisie[i];
                 j := j + 1;
             end;
        end;
        for i := 1 to (j - 1)do
        begin
            saisie[i] := res[i];
        end;
        saisie := Copy(saisie, 1, j- 1);
     
        Result := saisie;
    end;
     
    {******************************************************************************
    In: la valeur lue (moins le type de designation)et les valeurs à retourner
    Out:
    Description:  extrait d'une ligne du fichier d'indexation les info
    ******************************************************************************}
    procedure ExtraitValeurs(Buf : String; var Classification : Integer;
              var Index : String; var Enregistrement : LongInt ; var Champ : Integer);
    var i : Integer;
        j : Integer;
        IndiceNonEspace : Integer;
        espaceTrouve : Boolean;
        resClassif : string;
        test : LongInt;
        temp : String;
    begin
     i := 1;
     Index :=   chr(254);
     Index := '                                   ';
     resClassif :=   chr(254);
     resClassif := '                               ';
    while(not(isNotSpace(Buf[i])) and(i <= Length(Buf)))do
    begin
         i := i + 1;
    end;
     {la désignation}
     j := 1;
     while((i <= Length(Buf)) and ( isNotSpace(Buf[i])))do
     begin
          Index[j] := Buf[i];
          j := j + 1;
          i := i + 1;
        end;
      Index[j] := #0;
     Index := Copy(Index, 1, j - 1);
     while(not(isNotSpace(Buf[i])) and(i <= Length(Buf)))do
     begin
         i := i + 1;
     end;
    {La classification}
    j := 1;
     while((i <= Length(Buf)) and isNotSpace(Buf[i]))do
     begin
      resClassif[j] := Buf[i];
      j := j + 1;
      i := i + 1;
     end;
     resClassif[j] := #0;
     resClassif := Copy(resClassif, 1 , j - 1);
     Classification := MaStrToInt(resClassif);
     temp := Buf;
     Delete(temp, 1 , i -1);
     
      ExtraitCoordonneesNumeriques(temp, Enregistrement, Champ);
     
    end;
     
    {******************************************************************************
    In: Ce qu'il reste à analyser et les resulats
    Out:
    Description:  Verifie que l'alliage trouve corrspond au type de sous recherche
    ******************************************************************************}
    function SousRechercheTrouvee(Classification : Integer): Boolean;
    var
       res : Boolean;
    begin
         case Classification of
         SR_ACIERS_INT : res :=( (SousRecherche =  SR_ACIERS_INT) or (SousRecherche =  SR_TOUS_INT) );
         SR_ALU_INT : res := ((SousRecherche =  SR_ALU_INT)or (SousRecherche =  SR_TOUS_INT) );
         SR_CUIVRE_INT :res := ((SousRecherche =  SR_CUIVRE_INT)or (SousRecherche =  SR_TOUS_INT) );
         SR_INOX_INT : res := ((SousRecherche =  SR_INOX_INT)or (SousRecherche =  SR_TOUS_INT) );
         SR_NICKEL_INT :res := ((SousRecherche =  SR_NICKEL_INT)or (SousRecherche =  SR_TOUS_INT) );
         SR_TITANE_INT :res := ((SousRecherche =  SR_TITANE_INT)or (SousRecherche =  SR_TOUS_INT) );
         SR_SPECIAUX_INT :res := ((SousRecherche =  SR_SPECIAUX_INT)or (SousRecherche =  SR_TOUS_INT) );
         SR_NORME_INT :res := ((SousRecherche =  SR_NORME_INT)or (SousRecherche =  SR_TOUS_INT) );
         CLASSIF_NON_EXISTANTE_INT : res := False;
         else
             if(SousRecherche =  SR_TOUS_INT)then
             begin
             res := true;
             end
             else
             begin
             res := False;
             end;
         end;
         SousRechercheTrouvee := Res;
    end;
    {******************************************************************************
    In: Ce qu'il reste à analyser et les resulats
    Out:
    Description:  extrait les infos numeriques pour une recherche par designation
                  Les coordonnes de l'alliage recherche dans le base
    ******************************************************************************}
    procedure ExtraitCoordonneesNumeriques(reste : String ; var Enregistrement : LongInt ; var Champ : Integer);
    var i : Integer;
        temp : string;
        EnregistrementTemp : String;
        ChampTemp : String;
    begin
    {$I-}
    try
         temp := chr(254);
         temp := reste;
         i := 1;
         while( not isNotSpace(reste[i])  and(i <= Length(reste)) )do
         begin
              i := i + 1;
         end;
     
         Delete(temp, 1, i - 1);
         {Enregistrement}
         EnregistrementTemp := temp;
         Delete(EnregistrementTemp, Length(temp) - TAILLE_CHAMP_INT + 1, Length(temp));
         Enregistrement := StrToInt(EnregistrementTemp);
         if(IOResult <> 0)then
         begin
               raise Exception.Create('Erreur de conversion');
         end;
         ChampTemp := temp;
         Delete(ChampTemp, 1, Length(temp) - TAILLE_CHAMP_INT);
         Champ := StrToInt(ChampTemp);
         if(IOResult <> 0)then
         begin
               raise Exception.Create('Erreur de conversion');
         end;
    except
          ErreurBase1.ShowModal;
    end;
     {$I+}
    end;
     
     
     
    {******************************************************************************
    In: Ce qu'il reste à analyser et les resulats
    Out:
    Description: Verifie que ce n'est pas un index de durete, res, ou ela
    ******************************************************************************}
    function estIndexDesignation(Buf : string) : Boolean;
    var
       res : Boolean;
       Temporaire : String;
       Temporaire2 : String;
       Temporaire3 : String;
    begin
     
    if(Buf = '')then
    begin
            res := False;
    end
    else
    begin
         Temporaire := Buf;
         Temporaire2 := Buf;
         Temporaire3 := Buf;
         Delete(Temporaire,TAILLE_CHAINE_DURETE_INT + 1, Length(Buf));
         Delete(Temporaire2, TAILLE_CHAINE_ELASTICITE_INT + 1, Length(Buf));
         Delete(Temporaire3, TAILLE_CHAINE_RESISTANCE_INT + 1, Length(Buf));
         if((AnsiCompareStr(Temporaire, DURETE_STR) = 0) or(AnsiCompareStr(Temporaire2,ELASTICITE_STR) = 0)
                                        or(AnsiCompareStr(Temporaire3, RESISTANCE_STR) = 0))then
         begin
              res := False;
         end
         else
         begin
              res := True;
         end;
    end;
    estIndexDesignation := res;
    end;
     
    {******************************************************************************
    In: Ce qu'il reste à analyser et les resulats
    Out:
    Description: Verifie que c'est un index de durete
    ******************************************************************************}
    function  estIndexDurete(Buf : string) : Boolean;
    var
       res : Boolean;
       Temporaire : String;
    begin
     
         Temporaire := Buf;
         Delete(Temporaire,TAILLE_CHAINE_DURETE_INT + 1, Length(Buf));
         if((AnsiCompareStr(Temporaire, DURETE_STR) = 0))then
         begin
              res := True;
         end
         else
         begin
              res := False;
         end;
     
    estIndexDurete := res;
    end;
     
     
    {******************************************************************************
    In: Ce qu'il reste à analyser et les resulats
    Out:
    Description: Verifie que c'est un index de elasticite
    ******************************************************************************}
    function estIndexElasticite(Buf : string) : Boolean;
    var
       res : Boolean;
       Temporaire : String;
    begin
     
         Temporaire := Buf;
         Delete(Temporaire,TAILLE_CHAINE_ELASTICITE_INT + 1, Length(Buf));
         if((AnsiCompareStr(Temporaire, ELASTICITE_STR) = 0))then
         begin
              res := True;
         end
         else
         begin
              res := False;
         end;
     
    estIndexElasticite := res;
    end;
     
     
    {******************************************************************************
    In: Ce qu'il reste à analyser et les resulats
    Out:
    Description: Verifie que c'est un index de resistance
    ****************************************************************************}
    function estIndexResistance(Buf : string) : Boolean;
    var
       res : Boolean;
       Temporaire : String;
    begin
     
         Temporaire := Buf;
         Delete(Temporaire,TAILLE_CHAINE_RESISTANCE_INT + 1, Length(Buf));
         if((AnsiCompareStr(Temporaire, RESISTANCE_STR) = 0))then
         begin
              res := True;
         end
         else
         begin
              res := False;
         end;
     
    estIndexResistance := res;
    end;
     
    {******************************************************************************
    In:
    Out:
    Description: Verifie qi l'alliage correspond au critere de resistance
    ****************************************************************************}
    function BonCritereResistance(Buf : string;
              Demande : LongInt;
              Delta : LongInt;
              var index : string;
               var Classification : Integer;
               var Enregistrement : LongInt;
                var Champ : Integer) : Boolean;
    var
       res : Boolean;
       Temporaire : String;
       Temporaire2 : String;
       i : Integer;
       j : Integer;
     
       ResMinStr : String;
       ResMaxStr : String;
     
       ResMinInt : LongInt;
       ResMaxInt : LongInt;
     
    begin
    {$I-}
    try
         temporaire := chr(254);
         Temporaire := Buf;
         Delete(Temporaire,TAILLE_CHAINE_RESISTANCE_INT + 1, Length(Buf));
         if((AnsiCompareStr(Temporaire, RESISTANCE_STR) <> 0))then
         begin
              res := False;
         end
         else
         begin
              i := TAILLE_CHAINE_RESISTANCE_INT + 1;
              while( not isNotSpace(Buf[i])  and(i <= Length(Buf)) )do
              begin
                   i := i + 1;
              end;
     
              temporaire := chr(254);
              j := 1;
              {On est place au prmier non ' ' apres la fin de 'res'}
              while(isNotSpace(Buf[i])  and(i <= Length(Buf)) )do
              begin
                   Temporaire[j] := Buf[i];
                   i := i + 1;
                   j := j + 1;
              end;
     
              temporaire[j]:= #0;
              ResMinStr := Copy(Temporaire, 1, j -1 );
              ResMinInt := MaStrToInt(ResMinStr);
     
              if(IOResult <> 0)then
              begin
                    raise Exception.Create('Erreur de conversion');
              end;
     
              {On saute les espaces}
               while( not isNotSpace(Buf[i])  and(i <= Length(Buf)) )do
              begin
                   i := i + 1;
              end;
              temporaire := chr(254);
     
               {On passe au max}
              j := 1;
              while(isNotSpace(Buf[i])  and(i <= Length(Buf)) )do
              begin
                   Temporaire[j] := Buf[i];
                   i := i + 1;
                   j := j + 1;
              end;
     
              temporaire[j]:= #0;
     
              ResMaxStr := Copy(Temporaire, 1, j - 1);
              ResMaxInt := MaStrToInt(ResMaxStr);
     
     
              if(IOResult <> 0)then
              begin
                    raise Exception.Create('Erreur de conversion');
              end;
              {espace}
               while(not isNotSpace(Buf[i])  and(i <= Length(Buf)) )do
              begin
     
                   i := i + 1;
              end;
              temporaire := chr(254);
              {classification}
              j := 1;
               while(isNotSpace(Buf[i])  and(i <= Length(Buf)) )do
              begin
                   Temporaire[j] := Buf[i];
                   i := i + 1;
                   j := j + 1;
              end;
              temporaire[j]:= #0;
     
              Classification := maStrToInt(Copy(temporaire, 1, j - 1));
     
              if(Demande = DEMANDE_SPECIALE)then
              begin
                   Temporaire2 := Buf;
                   Delete(Temporaire2, 1, i-1);
                   ExtraitCoordonneesNumeriques(Temporaire2, Enregistrement, Champ );
                   res := true;
              end
              else
              begin
                   if((((Demande) >= (ResMinInt - Delta)) and ((Demande ) <= (ResMaxInt + Delta)))) then
                     begin
                       temporaire2 := chr(254);
                       Temporaire2 := Buf;
                       Delete(Temporaire2, 1, i-1);
     
                       ExtraitCoordonneesNumeriques(Temporaire2, Enregistrement, Champ );
                       res := True;
                      end
                      else
                      begin
                           res := False;
                      end;
                      end;
         end;
     
    except
           ErreurBase1.ShowModal;
    end;
     {$I+}
     
    BonCritereResistance := res;
    end;
     
     
    {******************************************************************************
    In: Ce qu'il reste à analyser et les resulats
    Out:
    Description: Recupere les infos du premier alliage
    ******************************************************************************}
    Function TraiteAlliageTypeInconnu(Buf1 : String;
              var Classification : Integer;
              var index : String;
              var Enregistrement : LongInt;
              var Champ : Integer;
              DemandeEntier : LongInt;
              DeltaEntier : LongInt): Boolean;
    var
       temporaire : string;
       res: Boolean;
    begin
     
         res := False;
         if(estIndexDesignation(Buf1))then
         begin
              ExtraitValeurs(Buf1, Classification, Index, Enregistrement, Champ);
         end
         else
         begin
             if(estIndexDurete(Buf1))then
             begin
                  temporaire := Buf1;
                  Delete(temporaire, 1, TAILLE_CHAINE_DURETE_INT);
                  ExtraitValeurs(temporaire, Classification, Index, Enregistrement, Champ);
              end
              else
              begin
                     if(estIndexElasticite(Buf1))then
                     begin
                          temporaire := Buf1;
                          Delete(temporaire, 1, TAILLE_CHAINE_ELASTICITE_INT);
                          ExtraitValeurs(temporaire, Classification, Index, Enregistrement, Champ);
                     end
                     else {Resistance}
                     begin
                          res := BonCritereResistance(Buf1, DemandeEntier,DeltaEntier
                                                         , Index
                                                         , Classification
                                                        , Enregistrement
                                                        , Champ )
                     end;
              end;
         end;
         TraiteAlliageTypeInconnu := res;
    end;
     {******************************************************************************
    In:
    Out:
    Description: Regarde si l'alliage precedent le courant correspond au type de recherche
    ******************************************************************************}
    function estBonCritereDeRecherche(Buf : string; ModeRecherche : Integer) : Boolean;
    var res : Boolean;
    begin
         case ModeRecherche of
         DESIGNATION_INT : res := estIndexDesignation(Buf);
         DURETE_INT : res := estIndexDurete(Buf);
         ELASTICITE_INT : res := estIndexElasticite(Buf);
         RESISTANCE_INT : res := estIndexResistance(Buf);
         else
             res := False
         end;
     estBonCritereDeRecherche := res;
    end;
     
    {******************************************************************************
    In:
    Out:
    Description: Initialise Un alliage;
    ******************************************************************************}
    procedure InitialisationAlliage(var AInitialiser : Alliage);
    begin
         AInitialiser.Afnor := Copy(RIEN_STR, 1, TAILLE_DESIGNATION_INT);
         AInitialiser.Werkstoff := Copy(RIEN_STR, 1, TAILLE_DESIGNATION_INT);
         AInitialiser.Din := Copy(RIEN_STR, 1, TAILLE_DESIGNATION_INT);
         AInitialiser.Bs := Copy(RIEN_STR, 1, TAILLE_DESIGNATION_INT);
         AInitialiser.Aisi := Copy(RIEN_STR, 1, TAILLE_DESIGNATION_INT);
         AInitialiser.Uns := Copy(RIEN_STR, 1, TAILLE_DESIGNATION_INT);
         AInitialiser.Nature := Copy(RIEN_STR, 1, TAILLE_DESIGNATION_INT);
         AInitialiser.Design1 := Copy(RIEN_STR, 1, TAILLE_DESIGNATION_INT);
         AInitialiser.Design2 := Copy(RIEN_STR, 1, TAILLE_DESIGNATION_INT);
         AInitialiser.Design3 := Copy(RIEN_STR, 1, TAILLE_DESIGNATION_INT);
         AInitialiser.Design4 := Copy(RIEN_STR, 1, TAILLE_DESIGNATION_INT);
         AInitialiser.Design5 := Copy(RIEN_STR, 1, TAILLE_DESIGNATION_INT);
         AInitialiser.Classif :=  Copy(RIEN_STR, 1, TAILLE_DESIGNATION_INT);
         AInitialiser.AL_ := Copy(RIEN_STR, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
         AInitialiser.AL:= Copy(RIEN_STR, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
         AInitialiser.AZ_:=  Copy(RIEN_STR, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
         AInitialiser.AZ:= Copy(RIEN_STR, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
         AInitialiser.C1_:= Copy(RIEN_STR, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
         AInitialiser.C1:= Copy(RIEN_STR, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
         AInitialiser.CO_:= Copy(RIEN_STR, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
         AInitialiser.CO:= Copy(RIEN_STR, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
         AInitialiser.CR_:= Copy(RIEN_STR, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
         AInitialiser.CR:= Copy(RIEN_STR, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
         AInitialiser.CU_:= Copy(RIEN_STR, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
         AInitialiser.CU:= Copy(RIEN_STR, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
         AInitialiser.FE_:= Copy(RIEN_STR, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
         AInitialiser.FE:= Copy(RIEN_STR, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
         AInitialiser.MG_:= Copy(RIEN_STR, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
         AInitialiser.MG:= Copy(RIEN_STR, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
         AInitialiser.MN_:= Copy(RIEN_STR, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
         AInitialiser.MN:= Copy(RIEN_STR, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
         AInitialiser.MO_:= Copy(RIEN_STR, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
         AInitialiser.MO:= Copy(RIEN_STR, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
         AInitialiser.NB_:= Copy(RIEN_STR, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
         AInitialiser.NB:= Copy(RIEN_STR, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
         AInitialiser.NI_:= Copy(RIEN_STR, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
     
         AInitialiser.NI:= Copy(RIEN_STR, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
         AInitialiser.PB_:= Copy(RIEN_STR, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
         AInitialiser.PB:=  Copy(RIEN_STR, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
         AInitialiser.P1_:=  Copy(RIEN_STR, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
         AInitialiser.P1:= Copy(RIEN_STR, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
         AInitialiser.SI_:= Copy(RIEN_STR, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
         AInitialiser.SI := Copy(RIEN_STR, 1, TAILLE_PROPRIETES_CHIMIQUES_INT);
         AInitialiser.SN_:= Copy(RIEN_STR,1,TAILLE_PROPRIETES_CHIMIQUES_INT);
         AInitialiser.SN:= Copy(RIEN_STR,1,TAILLE_PROPRIETES_CHIMIQUES_INT);
         AInitialiser.S1_:= Copy(RIEN_STR,1,TAILLE_PROPRIETES_CHIMIQUES_INT);
         AInitialiser.S1:= Copy(RIEN_STR,1,TAILLE_PROPRIETES_CHIMIQUES_INT);
         AInitialiser.TI_:= Copy(RIEN_STR,1,TAILLE_PROPRIETES_CHIMIQUES_INT);
         AInitialiser.TI:= Copy(RIEN_STR,1,TAILLE_PROPRIETES_CHIMIQUES_INT);
         AInitialiser.V1_:= Copy(RIEN_STR,1,TAILLE_PROPRIETES_CHIMIQUES_INT);
         AInitialiser.V1:= Copy(RIEN_STR,1,TAILLE_PROPRIETES_CHIMIQUES_INT);
         AInitialiser.W1_:= Copy(RIEN_STR,1,TAILLE_PROPRIETES_CHIMIQUES_INT);
         AInitialiser.W1:= Copy(RIEN_STR,1,TAILLE_PROPRIETES_CHIMIQUES_INT);
         AInitialiser.ZN_:= Copy(RIEN_STR,1,TAILLE_PROPRIETES_CHIMIQUES_INT);
         AInitialiser.ZN:= Copy(RIEN_STR,1,TAILLE_PROPRIETES_CHIMIQUES_INT);
     
         AInitialiser.Autre := Copy(RIEN_STR, 1, TAILLE_AUTRE_INT);
         AInitialiser.Densi := Copy(RIEN_STR, 1, TAILLE_DENSITE_INT);
         AInitialiser.Trt1 := Copy(RIEN_STR, 1, TAILLE_ETAT_INT);
         AInitialiser.Trt2 := Copy(RIEN_STR, 1, TAILLE_ETAT_INT);
         AInitialiser.Trt3 := Copy(RIEN_STR, 1, TAILLE_ETAT_INT);
         AInitialiser.Temp1 := Copy(RIEN_STR, 1, TAILLE_TEMPERATURE1_INT);
         AInitialiser.Temp2 := Copy(RIEN_STR, 1, TAILLE_TEMPERATURE1_INT);
         AInitialiser.Temp3 := Copy(RIEN_STR, 1, TAILLE_TEMPERATURE2_INT);
         AInitialiser.Resist11 := Copy(RIEN_STR, 1, TAILLE_RESISTANCE_INT);
         AInitialiser.Resist12 := Copy(RIEN_STR, 1, TAILLE_RESISTANCE_INT);
         AInitialiser.Resist21 := Copy(RIEN_STR, 1, TAILLE_RESISTANCE_INT);
         AInitialiser.Resist22 := Copy(RIEN_STR, 1, TAILLE_RESISTANCE_INT);
         AInitialiser.Elast1 := Copy(RIEN_STR, 1, TAILLE_ELASTICITE_INT);
         AInitialiser.Elast2 := Copy(RIEN_STR, 1, TAILLE_ELASTICITE_INT);
         AInitialiser.Allong1 := Copy(RIEN_STR, 1, TAILLE_ALLONGEMENT_INT);
         AInitialiser.Allong2 := Copy(RIEN_STR, 1, TAILLE_ALLONGEMENT_INT);
         AInitialiser.Dur1 := Copy(RIEN_STR, 1, TAILLE_DURETE_INT);
         AInitialiser.Dur2 := Copy(RIEN_STR, 1, TAILLE_DURETE_INT);
     
    end;
     
    {******************************************************************************
    In:
    Out:
    Description: Corrrige les carateres eronnes pour les normes
    ******************************************************************************}
    function CorrigeLecture(var Trouve : Alliage): Alliage;
    begin
         CorrigeString(Trouve.Afnor );
         CorrigeString(Trouve.Werkstoff );
         CorrigeString(Trouve.Din );
         CorrigeString(Trouve.Bs );
         CorrigeString(Trouve.Aisi );
         CorrigeString(Trouve.Uns );
         CorrigeString(Trouve.Nature );
         CorrigeString(Trouve.Design1 );
         CorrigeString(Trouve.Design2 );
         CorrigeString(Trouve.Design3 );
         CorrigeString(Trouve.Design4 );
         CorrigeString(Trouve.Design5 );
         CorrigeString(Trouve.Divus );
         CorrigeString(Trouve.Autre);
        AlliageCourant := Trouve ;
         CorrigeLecture:= Trouve;
    end;
     
     
    {******************************************************************************
    In:
    Out:
    Description: Corrrige les carateres eronne d'une string
    ******************************************************************************}
    procedure CorrigeString(var Trouve : String);
    var
       i : Integer;
       temp : String;
    begin
         for i := 1 to Length(Trouve)do
         begin
              Case Ord(Trouve[i])of
                   38 : Trouve[i] := Chr(ord('&'));
                   129 :Trouve[i] := Chr(Ord('ü'));
                   130: Trouve[i] := Chr(Ord('é'));
                   132 :Trouve[i] := Chr(Ord('ä'));
                   133 :Trouve[i] := Chr(Ord('à'));
                   135 :Trouve[i] := Chr(Ord('ç'));
                   136 : Trouve[i] := Chr(ord('ê'));
                   137 : Trouve[i] := Chr(ord('ë'));
                   138 :Trouve[i] := Chr(Ord('è'));
                   139 : Trouve[i] := Chr(Ord('ï'));
                   140 : Trouve[i] := Chr(Ord('î'));
                   147 : Trouve[i] := Chr(Ord('ô'));
                   148 : Trouve[i] := Chr(ord('ö'));
                   150 :Trouve[i] := Chr(Ord('û'));
                   151 :Trouve[i] := Chr(Ord('ù'));
                   153 :Trouve[i] := Chr(Ord('Ö'));
                   154 :Trouve[i] := Chr(Ord('Ü'));
                   156 :Trouve[i] := Chr(Ord('£'));
                   186 : Trouve[i] := Chr(Ord('|'));
                   248 :Trouve[i] := Chr(Ord('°'));
              else
              end;
         end;
    end;
     
    end.
    j'avoue que pour moi c'est la grande brasse

  9. #9
    Expert éminent sénior
    Avatar de ShaiLeTroll
    Homme Profil pro
    Développeur C++\Delphi
    Inscrit en
    Juillet 2006
    Messages
    13 665
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 43
    Localisation : France, Seine Saint Denis (Île de France)

    Informations professionnelles :
    Activité : Développeur C++\Delphi
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juillet 2006
    Messages : 13 665
    Points : 25 459
    Points
    25 459
    Par défaut
    cherche la déclaration du type Alliage probablement un record ou class
    Vérifie les membres Afnor, Werkstoff ... si c'est sont des property, tu ne peux pourra plus utiliser de var, il faudra transformer
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    procedure CorrigeString(var Trouve : String);
    en
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    function CorrigeString(const Trouve : String): string;
    D'ailleurs CorrigeString, ça doit être une version à la main de l'API OemToChar

    Majuscule() pourrait être remplacé par UpperCase().
    Mon pauvre, tu as une tonne de code inutile par ce que la codeuse d'origine ne devait pas connaître les fonctions de base !

    quand je disais de retirer [0], c'était pas que le [0] mais tout la ligne exemple

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    Index :=   chr(254);
     Index := '                                   ';
     resClassif :=   chr(254);
     resClassif := '                               ';
    devient
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     Index := '                                   ';
     resClassif := '                               ';
    Je suis surpris par , ça existait déjà en Delphi 1 et en D3 ! Oh ?

    Pourquoi tu ne recontactes pas l'auteur du code ? Surtout qu'il n'est pas si vieux, il est daté de 2002, ça fait pas 16 ans ça !

  10. #10
    Nouveau Candidat au Club
    Homme Profil pro
    gestionnaire base de données
    Inscrit en
    Décembre 2011
    Messages
    5
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : gestionnaire base de données

    Informations forums :
    Inscription : Décembre 2011
    Messages : 5
    Points : 1
    Points
    1
    Par défaut suite, suite
    Pourquoi tu ne recontactes pas l'auteur du code ?
    J'ai bien tenté, mais sans succès, n'habite plus à l'adresse indiquée, ni au téléphone, ni à l'e-mail !

    Surtout qu'il n'est pas si vieux, il est daté de 2002, ça fait pas 16 ans ça !
    Perspicace, effectivement j'ai globalisé. Entre la conception en 1986, écrit d'abord en basic en 1992, en DOS en 1995, puis en Delphi en 2002 c'est un bébé de presque 26 ans. En fait 16 ans c'est le laps de temps de sa commercialisation. Et je ne vous parle pas des tâches de gras sur les disquettes souples HD double faces occasionnées par des dégustations intempestives de pizzas entre deux lignes de code, sur un bureau fait avec deux tréteaux et une porte de chambre dégondée. Paraît qu’Apple, Microsoft ou Hewlett ont démarré dans leur garage... nous cétait pas loin du cagibi.

  11. #11
    Expert éminent sénior
    Avatar de ShaiLeTroll
    Homme Profil pro
    Développeur C++\Delphi
    Inscrit en
    Juillet 2006
    Messages
    13 665
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 43
    Localisation : France, Seine Saint Denis (Île de France)

    Informations professionnelles :
    Activité : Développeur C++\Delphi
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juillet 2006
    Messages : 13 665
    Points : 25 459
    Points
    25 459
    Par défaut
    En 2002, il y avait Delphi 7, cela m'étonne que ton programme soit alors en 16bits ! Cela faisait pas mal de temps que le Win32 était présent en Delphi !
    Commencer un projet en Delphi 1 (1995) avec son look de Win3.1 en 2002 devait être un peu choquant non ?
    En fait, tu migrais à chaque fois avec la technologie obsolète mais gratuite ? écrire un programme DOS en 1995 alors que OWL existait déjà sous Borland C++ et Turbo Pascal for Windows 3.1

    Ne recommence pas la même erreur, passe directement à la dernière génération !

    Honnêtement ! Essaye Lazarus !
    C'est une équivalent libre de Delphi, tu auras au moins des nouveautés par rapport à D3 car effectivement les licences Starter de Delphi ne permettent pas une vraie commercialisation

    Lazarus pourra t'ouvrir en plus à Linux, tu pourrais ainsi avoir une distribution nouvelle, il y a une ouverture avec Mac OS X !

    Tu passes bien un code Delphi 1 à Delphi 3 ?
    Je pensais que StrToIntDef n'était apparu qu'en D5 et que TryStrToInt était apparu en D6 ?
    En même temps, beaucoup de fonction apparaissent avant d'être documenté et l'on ne les découvre que tardivement !
    Cela m'étonne quand même !

  12. #12
    Rédacteur/Modérateur
    Avatar de Andnotor
    Inscrit en
    Septembre 2008
    Messages
    5 812
    Détails du profil
    Informations personnelles :
    Localisation : Autre

    Informations forums :
    Inscription : Septembre 2008
    Messages : 5 812
    Points : 13 527
    Points
    13 527
    Par défaut
    Citation Envoyé par engivalhp Voir le message
    J'ai appliqué vos recommandations, il reste plus que deux erreurs...
    Deux erreurs avant les 20 prochaines unités !

    Citation Envoyé par ShaiLeTroll Voir le message
    En fait, tu migrais à chaque fois avec la technologie obsolète mais gratuite ?
    Et la main d'oeuvre aussi manifestement ! Depuis 26 ans... Joli

    ps: ce sujet est proche de la clôture.

  13. #13
    Expert éminent sénior
    Avatar de Jipété
    Profil pro
    Inscrit en
    Juillet 2006
    Messages
    10 933
    Détails du profil
    Informations personnelles :
    Localisation : France, Hérault (Languedoc Roussillon)

    Informations forums :
    Inscription : Juillet 2006
    Messages : 10 933
    Points : 15 380
    Points
    15 380
    Par défaut
    Bonsoir,
    Citation Envoyé par engivalhp Voir le message
    Voila, j'ai enlevé les [0] je suis passé sur une autre page de code qui s'appelle
    STRINGAL.PAS

    çà bloque à procedure ChangeSaisie
    ligne
    122 la variable 'res' est déclarée mais jamais utilisée dans 'changesaisie'
    172 la variable 'test' est déclarée mais jamais utilisée dans 'changesaisienumerique'
    203 la variable 'test' est déclarée mais jamais utilisée dans 'extraitvaleursnumeriques'
    234 la variable 'indicenonespace' est déclarée mais jamais utilisée dans 'extraitvaleurs'
    235 la variable 'espacetrouve' est déclarée mais jamais utilisée dans 'extraitvaleurs'
    237 la variable 'test' est déclarée mais jamais utilisée dans 'extraitvaleurs' (...)
    Bon, ça, ça veut dire que tu déclares des trucs que tu n'utilises pas. Exemple avec une form, un bouton et un label :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    procedure TForm1.Button1Click(Sender: TObject);
    var
      i: integer;
      s: string;
    begin
      for i := 0 to 9 do
        label1.Caption := IntToStr(i);
    end;
    Compiles ça et tu auras ce genre de message à propos de "s",


    Citation Envoyé par engivalhp Voir le message
    (...) avertissement: la variable 'res' peut-etre pas déclarée (...)
    Faudrait voir à propos de quelle ligne le compilo met ça...


    Citation Envoyé par engivalhp Voir le message
    (...) puis ligne 775 a 788
    les types des paramètreS VAR originaux et formels doivent être identiques
    T'appelles une fonction d'une manière différente de sa déclaration,
    Exemple :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    function MaFonction(var i: double): string; // déclaration avec un "double"
    begin
      Result := FloatToStr(i);
    end;
     
    procedure TForm1.Button1Click(Sender: TObject);
    var
      i: integer;
    begin
      i := 0;
      label1.Caption := MaFonction(i); // appel avec un "integer"
    end;

    Que sont devenues les nombreuses erreurs identiques visibles sur la première copie d'écran ?

    Lazarus... Mouais...
    Si t'es pas trop à l'aise avec la programmation, ça va être coton, parce qu'il faut parfois mettre les mains dans le cambouis...

  14. #14
    Expert confirmé
    Avatar de Ph. B.
    Homme Profil pro
    Freelance
    Inscrit en
    Avril 2002
    Messages
    1 786
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 58
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations professionnelles :
    Activité : Freelance
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2002
    Messages : 1 786
    Points : 5 918
    Points
    5 918
    Par défaut
    Citation Envoyé par engivalhp Voir le message
    çà bloque à procedure ChangeSaisie
    ligne
    122 la variable 'res' est déclarée mais jamais utilisée dans 'changesaisie'
    ...
    Tous les messages du compilateur préfixés par [Conseil] peuvent être ignorés ! à ignorer compte tenu de tes impératifs !
    Tous les messages du compilateur préfixés par [Avertissement] ne sont pas bloquants mais pourraient générer une erreur à l'exécution, mais c'est très loin d'être systématique ! à ignorer dans un 1° temps compte tenu de tes impératifs !
    Citation Envoyé par engivalhp Voir le message
    les types des paramètreS VAR originaux et formels doivent être identiques
    Comme l'a justement dit @ShaiLeTroll, il faut réécrire la fonction et la manière de l'appeler.

    Si le type Alliage est une classe d'objet, le code suivant peut être utilisé.
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    ...
    function CorrigeLecture(Trouve : Alliage): Alliage;
    function CorrigeString(const Trouve : String): String;
     
    implementation
    ...
    {******************************************************************************
    In:
    Out:
    Description: Corrige les caractères erronés pour les normes
    ******************************************************************************}
    function CorrigeLecture(Trouve: Alliage): Alliage;
    begin
      Trouve.Afnor := CorrigeString(Trouve.Afnor);
      Trouve.Werkstoff := CorrigeString(Trouve.Werkstoff);
      Trouve.Din := CorrigeString(Trouve.Din);
      Trouve.Bs := CorrigeString(Trouve.Bs);
      Trouve.Aisi := CorrigeString(Trouve.Aisi);
      Trouve.Uns := CorrigeString(Trouve.Uns);
      Trouve.Nature := CorrigeString(Trouve.Nature);
      Trouve.Design1 := CorrigeString(Trouve.Design1);
      Trouve.Design2 := CorrigeString(Trouve.Design2);
      Trouve.Design3 := CorrigeString(Trouve.Design3);
      Trouve.Design4 := CorrigeString(Trouve.Design4);
      Trouve.Design5 := CorrigeString(Trouve.Design5);
      Trouve.Divus := CorrigeString(Trouve.Divus);
      Trouve.Autre := CorrigeString(Trouve.Autre);
      AlliageCourant := Trouve;
      Result := Trouve;
    end;
     
     
    {******************************************************************************
    In:
    Out:
    Description: Corrige les caractères erronés d'une string
    ******************************************************************************}
    function CorrigeString(const Trouve : String): String;
    var
      i : Integer;
      Temp : String;
    begin
      Temp := Trouve;
      for i := 1 to Length(Temp) do
      begin
        Case Ord(Temp[i])of
           38 : Temp[i] := '&';
          129 : Temp[i] := 'ü';
          130 : Temp[i] := 'é';
          132 : Temp[i] := 'ä';
          133 : Temp[i] := 'à';
          135 : Temp[i] := 'ç';
          136 : Temp[i] := 'ê';
          137 : Temp[i] := 'ë';
          138 : Temp[i] := 'è';
          139 : Temp[i] := 'ï';
          140 : Temp[i] := 'î';
          147 : Temp[i] := 'ô';
          148 : Temp[i] := 'ö';
          150 : Temp[i] := 'û';
          151 : Temp[i] := 'ù';
          153 : Temp[i] := 'Ö';
          154 : Temp[i] := 'Ü';
          156 : Temp[i] := '£';
          186 : Temp[i] := '|';
          248 : Temp[i] := '°';
        end;
      end;
      Result := Temp;
    end;
    ...
    Si le type Alliage est un enregistrement, il faut garder le préfixe var pour le paramètre de la fonction CorrigeLecture.

    Ensuite, au vu du code, il y a des fonctions inutiles:
    MaStrToInt peut être directement remplacée par StrToIntDef
    MaStrToFloat peut être directement remplacée par StrToFloatDef

    Enfin, bon courage !
    --
    Philippe

  15. #15
    Membre éclairé

    Homme Profil pro
    Rédacteur technique (retraité)
    Inscrit en
    Octobre 2009
    Messages
    168
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 81
    Localisation : France, Essonne (Île de France)

    Informations professionnelles :
    Activité : Rédacteur technique (retraité)

    Informations forums :
    Inscription : Octobre 2009
    Messages : 168
    Points : 807
    Points
    807
    Par défaut
    Citation Envoyé par ShaiLeTroll Voir le message
    Je pensais que StrToIntDef n'était apparu qu'en D5 et que TryStrToInt était apparu en D6 ?
    D'après la doc PDF de Delphi 1 (1995) que j'ai retrouvée sur un vieux CD d'install de D2, StrToIntDef existait déja bel-et-bien dès la version 1 mais pas de trace de TryStrToInt.

Discussions similaires

  1. Réponses: 15
    Dernier message: 01/10/2013, 15h00
  2. Programmer un PDA avec Delphi
    Par ROYER dans le forum EDI
    Réponses: 6
    Dernier message: 04/01/2008, 21h45
  3. Compatibilité Delphi 5 avec Windows XP Pro
    Par euraldic dans le forum EDI
    Réponses: 11
    Dernier message: 02/11/2005, 12h18
  4. Réponses: 3
    Dernier message: 29/06/2005, 13h56
  5. Programmation WEB avec delphi
    Par mayoguy dans le forum Web & réseau
    Réponses: 4
    Dernier message: 20/08/2002, 19h03

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo