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

Fortran Discussion :

Chaine de character dynamique


Sujet :

Fortran

  1. #1
    Membre averti
    Inscrit en
    Juillet 2007
    Messages
    19
    Détails du profil
    Informations forums :
    Inscription : Juillet 2007
    Messages : 19
    Par défaut Chaine de character dynamique
    Bonjour a tous,

    Voila je ne suis pas du monde Fortran mais pour un projet, j'ai du réaliser un bridge Fortran C qui se connecte à un WebService RestFull.

    Le bridge fonctionne bien mais il me reste une inconnue.

    Quand le client Fortran appelle mon code C qui fait la connexion HTTP vers mon WebService celui-ci me retourne une réponse en format JSON que je dois retourner a mon code Fortran. Mais je ne connais pas la taille de ma réponse, d’où, comment puis je récupérer une chaine de character dynamique en Fortran?

    J'ai essaie la syntaxe character*(*) ou character(len=*) mais sans succes.
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
     
     
    ....
    character(len=*) response
     
     
     
    response = do_get(.....)
    ....
    L'erreur
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
     
    character(len=*) :: response                                      
                                      1
    Error: Entity with assumed character length at (1) must be a dummy argument or a PARAMETER

    Si quelqu'un pouvais m'aider avec un bout de code se serais sympa

    Merci pour votre aide
    LeSnul.

  2. #2
    Modérateur

    Profil pro
    Inscrit en
    Août 2006
    Messages
    974
    Détails du profil
    Informations personnelles :
    Localisation : Canada

    Informations forums :
    Inscription : Août 2006
    Messages : 974
    Par défaut
    Il y a probablement des solutions assez directes en Fortran 2003, mais je ne les connais pas.

    Une solution plus classique consiste à modifier ta fonction C pour retourner la réponse via un argument plutôt que via le résultat de la fonction.

    Tu dois savoir que Fortran (avant 2003) ne supporte pas de variable caractère de longueur dynamique. Tu dois donc déclarer une variable caractère de longueur suffisamment longue et passer cette variable à la fonction C. Dans les faits, le compilateur Fortran passera également, à la fin de la liste des arguments, un argument additionnel (caché du point de Fortran), passé par valeur (et non par référence), contenant la longueur de la variable caractère.

    Au retour de la fonction en Fortran, tu peux chercher le caractère null char(0) par la fonction index() pour connaitre la longueur de la chaîne.

  3. #3
    Membre averti
    Inscrit en
    Juillet 2007
    Messages
    19
    Détails du profil
    Informations forums :
    Inscription : Juillet 2007
    Messages : 19
    Par défaut
    Citation Envoyé par Sylvain Bergeron Voir le message
    Il y a probablement des solutions assez directes en Fortran 2003, mais je ne les connais pas.

    Une solution plus classique consiste à modifier ta fonction C pour retourner la réponse via un argument plutôt que via le résultat de la fonction.

    Tu dois savoir que Fortran (avant 2003) ne supporte pas de variable caractère de longueur dynamique. Tu dois donc déclarer une variable caractère de longueur suffisamment longue et passer cette variable à la fonction C. Dans les faits, le compilateur Fortran passera également, à la fin de la liste des arguments, un argument additionnel (caché du point de Fortran), passé par valeur (et non par référence), contenant la longueur de la variable caractère.

    Au retour de la fonction en Fortran, tu peux chercher le caractère null char(0) par la fonction index() pour connaitre la longueur de la chaîne.
    Ok, mais c'est pas super super comme solution, car la je déclare ma chaine d'une taille de 65536 (la taille de ma réponse est trop variable, tantôt 2000, tantôt 30000 dans le cas ou je retourne des objets avec une structure complexe)

    donc le code deviens:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
     
    character(len=65536) response
     
    ...
    call do_get(response, .....)
    ...
    Si il y a une solution plus jolie je suis preneur et merci pour ta réponse

    LeSnul

  4. #4
    Modérateur

    Profil pro
    Inscrit en
    Août 2006
    Messages
    974
    Détails du profil
    Informations personnelles :
    Localisation : Canada

    Informations forums :
    Inscription : Août 2006
    Messages : 974
    Par défaut
    En Fortran 2003 ou 2008 (je ne suis plus certain lequel), il est possible de ddéclarer une variable caractère dynamique : character (len=*) Var, et ensuite l'allouer. Si ton compilateur le supporte, tu peux regarder dans cette direction.

    L'autre possibilité est de te rapprocher du C dans la représentation des chaînes de caractères en utilisant un vecteur de caractère, chaque élément du vecteur contenant un seul caractère.

    Dans les 2 cas, tu auras cependant à encoder en C la struct de contrôle de la variable car quand tu passe un allocatable à une fonction (ou une sub), c'est un header à la variable qui est passé, et non l'adresse du début de la variable.

    Finalement, le plus simple comme tu n'aimes pas la solution initiale : Vas voir du côté de l'interface à C de Fortran 2003. Il est possible alors de déclarer en Fortran l'équivalent de char *Var;, mais je n'ai jamais essayé...

  5. #5
    Membre extrêmement actif
    Inscrit en
    Avril 2008
    Messages
    2 573
    Détails du profil
    Informations personnelles :
    Âge : 65

    Informations forums :
    Inscription : Avril 2008
    Messages : 2 573
    Par défaut module fortran Isovar,standard ISO/IEC 1539-2 : 1999,public
    Bonjour LeSnul
    Tu peux traiter des "string variable length" à l'aide du module fortran public Isovar.f90.

    Regarde ce lien de l'auteur redacteur du module & membre du standard committee :document has been prepared by [email]J.L.Schonfelder

    http://www.google.fr/url?sa=t&source...N7GMP-K57engUA
    Ce module source est repris par Visual Fortran Compaq 6.6.

    Sur ce lien le source code du module public:
    http://www.google.fr/url?sa=t&source...t5q7an6gsNc76g

    ici un code exemple qui teste quelques fonction de ce module fourni sous Visual Fortran Compaq :program iso_var_unit_tests.f90
    Le module Isovar s'appelle dans cet exemple ISO_VARYING_STRING.f90
    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
    1144
    1145
    1146
    1147
    1148
    1149
    1150
    1151
    1152
    1153
    1154
    1155
    1156
    1157
    1158
    1159
    1160
    1161
    1162
    1163
    1164
    1165
    1166
    1167
    1168
    1169
    1170
    1171
    1172
    1173
    1174
    1175
    1176
    1177
    1178
    1179
    1180
    1181
    1182
    1183
    1184
    1185
    1186
    1187
    1188
    1189
    1190
    1191
    1192
    1193
    1194
    1195
    1196
    1197
    1198
    1199
    1200
    1201
    1202
    1203
    1204
    1205
    1206
    1207
    1208
    1209
    1210
    1211
    1212
    1213
    1214
    1215
    1216
    1217
    1218
    1219
    1220
    1221
    1222
    1223
    1224
    1225
    1226
    1227
    1228
    1229
    1230
    1231
    1232
    1233
    1234
    1235
    1236
    1237
    1238
    1239
    1240
    1241
    1242
    1243
    1244
    1245
    1246
    1247
    1248
    1249
    1250
    1251
    1252
    1253
    1254
    1255
    1256
    1257
    1258
    1259
    1260
    1261
    1262
    1263
    1264
    1265
    1266
    1267
    1268
    1269
    1270
    1271
    1272
    1273
    1274
    1275
    1276
    1277
    1278
    1279
    1280
    1281
    1282
    1283
    1284
    1285
    1286
    1287
    1288
    1289
    1290
    1291
    1292
    1293
    1294
    1295
    1296
    1297
    1298
    1299
    1300
    1301
    1302
    1303
    1304
    1305
    1306
    1307
    1308
    1309
    1310
    1311
    1312
    1313
    1314
    1315
    1316
    1317
    1318
    1319
    1320
    1321
    1322
    1323
    1324
    1325
    1326
    1327
    1328
    1329
    1330
    1331
    1332
    1333
    1334
    1335
    1336
    1337
    1338
    1339
    1340
    1341
    1342
    1343
    1344
    1345
    1346
    1347
    1348
    1349
    1350
    1351
    1352
    1353
    1354
    1355
    1356
    1357
    1358
    1359
    1360
    1361
    1362
    1363
    1364
    1365
    1366
    1367
    1368
    1369
    1370
    1371
    1372
    1373
    1374
    1375
    1376
    1377
    1378
    1379
    1380
    1381
    1382
    1383
    1384
    1385
    1386
    1387
    1388
    1389
    1390
    1391
    1392
    1393
    1394
    1395
    1396
    1397
    1398
    1399
    1400
    1401
    1402
    1403
    1404
    1405
    1406
    1407
    1408
    1409
    1410
    1411
    1412
    1413
    1414
    1415
    1416
    1417
    1418
    1419
    1420
    1421
    1422
    1423
    1424
    1425
    1426
    1427
    1428
    1429
    1430
    1431
    1432
    1433
    1434
    1435
    1436
    1437
    1438
    1439
    1440
    1441
    1442
    1443
    1444
    1445
    1446
    1447
    1448
    1449
    1450
    1451
    1452
    1453
    1454
    1455
    1456
    1457
    1458
    1459
    1460
    1461
    1462
    1463
    1464
    1465
    1466
    1467
    1468
    1469
    1470
    1471
    1472
    1473
    1474
    1475
    1476
    1477
    1478
    1479
    1480
    1481
    1482
    1483
    1484
    1485
    1486
    1487
    1488
    1489
    1490
    1491
    1492
    1493
    1494
    1495
    1496
    1497
    1498
    1499
    1500
    1501
    1502
    1503
    1504
    1505
    1506
    1507
    1508
    1509
    1510
    1511
    1512
    1513
    1514
    1515
    1516
    1517
    1518
    1519
    1520
    1521
    1522
    1523
    1524
    1525
    1526
    1527
    1528
    1529
    1530
    1531
    1532
    1533
    1534
    1535
    1536
    1537
    1538
    1539
    1540
    1541
    1542
    1543
    1544
    1545
    1546
    1547
    1548
    1549
    1550
    1551
    1552
    1553
    1554
    1555
    1556
    1557
    1558
    1559
    1560
    1561
    1562
    1563
    1564
    1565
    1566
    1567
    1568
    1569
    1570
    1571
    1572
    1573
    1574
    1575
    1576
    1577
    1578
    1579
    1580
    1581
    1582
    1583
    1584
    1585
    1586
    1587
    1588
    1589
    1590
    1591
    1592
    1593
    1594
    1595
    1596
    1597
    1598
    1599
    1600
    1601
    1602
    1603
    1604
    1605
    1606
    1607
    1608
    1609
    1610
    1611
    1612
    1613
    1614
    1615
    1616
    1617
    1618
    1619
    1620
    1621
    1622
    1623
    1624
    1625
    1626
    1627
    1628
    1629
    1630
    1631
    1632
    1633
    1634
    1635
    1636
    1637
    1638
    1639
    1640
    1641
    1642
    1643
    1644
    1645
    1646
    1647
    1648
    1649
    1650
    1651
    1652
    1653
    1654
    1655
    1656
    1657
    1658
    1659
    1660
    1661
    1662
    1663
    1664
    1665
    1666
    1667
    1668
    1669
    1670
    1671
    1672
    1673
    1674
    1675
    1676
    1677
     
    integer function test1()
    !  ELEMENTAL FUNCTION len_s(string) ! generic LEN
    !     type(VARYING_STRING),INTENT(IN) :: string 
    !     INTEGER                         :: len_s 
    !>>>
    USE ISO_VARYING_STRING
    type(VARYING_STRING) :: string
    string = "1234567890" 
    if(LEN(string).eq.10) then
       test1 = 0
    else
       test1 = 1
    endif
    end function test1
     
    integer function test2()
    ! ELEMENTAL FUNCTION c_to_s(chr) ! generic VAR_STR
    !     type(VARYING_STRING)        :: c_to_s 
    !     CHARACTER(LEN=*),INTENT(IN) :: chr 
    !     INTEGER                     :: lc 
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING)        :: s
         s =  "1234567890"
    if(VAR_STR("1234567890") .eq. s) then
       test2 = 0
    else
       test2 = 1
    endif
    end function test2
     
    integer function test3()
    !ELEMENTAL SUBROUTINE s_ass_s(var,expr) VARYING
    !     type(VARYING_STRING),INTENT(INOUT) :: var 
    !     type(VARYING_STRING),INTENT(IN)  :: expr 
    !>>>
    USE ISO_VARYING_STRING
    type(VARYING_STRING) :: var 
    type(VARYING_STRING) :: expr
    var = "abcdef" 
    expr = "12345" // var
    if(expr .eq. VAR_STR("12345abcdef")) then
       test3 = 0
    else
       test3 = 1
    endif
    end function test3
     
    integer function test4()
    !ELEMENTAL SUBROUTINE c_ass_s(var,expr) 
    !     CHARACTER(LEN=*),INTENT(OUT)    :: var 
    !     type(VARYING_STRING),INTENT(IN) :: expr 
    !     INTEGER                         :: lc,ls 
    !>>>
    USE ISO_VARYING_STRING
          CHARACTER(25)                   :: var 
          type(VARYING_STRING)            :: expr
          expr = "abcdef12345"
          var = expr 
    if(var .eq. "abcdef12345") then
       test4 = 0
    else
       test4 = 1
    endif
    end function test4
     
    integer function test5()
    !ELEMENTAL SUBROUTINE s_ass_c(var,expr)
    !     type(VARYING_STRING),INTENT(OUT) :: var 
    !     CHARACTER(LEN=*),INTENT(IN)      :: expr 
    !     INTEGER                          :: lc 
    !>>>
    USE ISO_VARYING_STRING
          type(VARYING_STRING) :: var 
          CHARACTER(25)        :: expr
          expr = "abcdef"
    	  var = expr 
    if(var .eq. "abcdef") then
       test5 = 0
    else
       test5 = 1
    endif
    end function test5
     
    integer function test6()
    ! ELEMENTAL FUNCTION s_concat_s(string_a,string_b)  ! string//string 
    !     type(VARYING_STRING),INTENT(IN) :: string_a,string_b 
    !     type(VARYING_STRING)            :: s_concat_s 
    !     INTEGER                         :: la,lb 
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING):: string_a,string_b,string_c
    	 string_a = "12345"
    	 string_b = "abcdef"
    	 string_c = string_a // string_b 
    if(string_c == VAR_STR("12345abcdef")) then
       test6 = 0
    else
       test6 = 1
    endif
    end function test6
     
    integer function test7()
    ! ELEMENTAL FUNCTION s_concat_c(string_a,string_b)  ! string//character
    !     type(VARYING_STRING),INTENT(IN) :: string_a 
    !     CHARACTER(LEN=*),INTENT(IN)     :: string_b 
    !     type(VARYING_STRING)            :: s_concat_c 
    !     INTEGER                         :: la,lb 
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING):: string_a,string_c
    	 character(6) string_b
    	 string_a = "12345"
    	 string_b = "abcdef"
    	 string_c = string_a // string_b 
    if(string_c == VAR_STR("12345abcdef")) then
       test7 = 0
    else
       test7 = 1
    endif
    end function test7
     
    integer function test8()
    ! ELEMENTAL FUNCTION c_concat_s(string_a,string_b)  ! character//string 
    !     CHARACTER(LEN=*),INTENT(IN)     :: string_a 
    !     type(VARYING_STRING),INTENT(IN) :: string_b 
    !     type(VARYING_STRING)            :: c_concat_s 
    !     INTEGER                         :: la,lb 
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: string_b,string_c
    	 character(5) string_a
    	 string_a = "12345"
    	 string_b = "abcdef"
    	 string_c = string_a // string_b 
    if(string_c == VAR_STR("12345abcdef")) then
       test8 = 0
    else
       test8 = 1
    endif
    end function test8
     
    integer function test9()
    !ELEMENTAL FUNCTION repeat_s(string,ncopies)                                     
    !    type(VARYING_STRING),INTENT(IN) :: string 
    !    INTEGER,INTENT(IN)              :: ncopies 
    !    type(VARYING_STRING)            :: repeat_s
    !    INTEGER                         :: lr,ls 
    !>>>
    USE ISO_VARYING_STRING
        type(VARYING_STRING) :: string_a, string_b
        INTEGER              :: ncopies = 5
    	string_b = "123"
    	string_a = repeat(string_b, ncopies)
    if(string_a == VAR_STR("123123123123123")) then
       test9 = 0
    else
       test9 = 1
    endif
    end function test9
     
    integer function test10()
    ! ELEMENTAL FUNCTION s_eq_s(string_a,string_b)  ! string==string 
    !     type(VARYING_STRING),INTENT(IN) :: string_a,string_b 
    !     LOGICAL                         :: s_eq_s 
    !     INTEGER                         :: la,lb 
    !>>>
    USE ISO_VARYING_STRING
        type(VARYING_STRING) :: string_a , string_b  
     string_a = "123"
     string_b = "123"
    if(string_a == string_b) then
       test10 = 0
    else
       test10 = 1
    endif
    end function test10
     
    integer function test11()
    ! ELEMENTAL FUNCTION s_eq_c(string_a,string_b)  ! string==character 
    !     type(VARYING_STRING),INTENT(IN) :: string_a 
    !     CHARACTER(LEN=*),INTENT(IN)     :: string_b 
    !     LOGICAL                         :: s_eq_c 
    !     INTEGER                         :: la,lb,ls
    !>>>
    USE ISO_VARYING_STRING
        type(VARYING_STRING) :: string_a
    	character(3) ::  string_b = "123" 
      string_a= "123"
    if(string_a == string_b) then
       test11 = 0
    else
       test11 = 1
    endif
    end function test11
     
    integer function test12()
    ! ELEMENTAL FUNCTION c_eq_s(string_a,string_b)  ! character==string 
    !     CHARACTER(LEN=*),INTENT(IN)     :: string_a 
    !     type(VARYING_STRING),INTENT(IN) :: string_b 
    !     LOGICAL                         :: c_eq_s 
    !     INTEGER                         :: la,lb,ls
    !>>>
    USE ISO_VARYING_STRING
        type(VARYING_STRING) :: string_b
    	character(3) ::  string_a = "123" 
    string_b = "123"
    if(string_a == string_b) then
       test12 = 0
    else
       test12 = 1
    endif
    end function test12
     
    integer function test13()
    ! ELEMENTAL FUNCTION s_ne_s(string_a,string_b)  ! string/=string 
    !     type(VARYING_STRING),INTENT(IN) :: string_a,string_b 
    !     LOGICAL                         :: s_ne_s 
    !     INTEGER                         :: la,lb 
    !>>>
    USE ISO_VARYING_STRING
        type(VARYING_STRING) :: string_a , string_b  
     string_a = "124"
     string_b = "123"
    if(string_a /= string_b) then
       test13 = 0
    else
       test13 = 1
    endif
    end function test13
     
    integer function test14()
    ! ELEMENTAL FUNCTION s_ne_c(string_a,string_b)  ! string/=character
    !     type(VARYING_STRING),INTENT(IN) :: string_a 
    !     CHARACTER(LEN=*),INTENT(IN)     :: string_b 
    !     LOGICAL                         :: s_ne_c 
    !     INTEGER                         :: la,lb,ls
    !>>>
    USE ISO_VARYING_STRING
        type(VARYING_STRING) :: string_a
    	character(3) ::  string_b = "123" 
    string_a = "124"
    if(string_a /= string_b) then
       test14 = 0
    else
       test14 = 1
    endif
    end function test14
     
    integer function test15()
    ! ELEMENTAL FUNCTION c_ne_s(string_a,string_b)  ! character/=string 
    !     CHARACTER(LEN=*),INTENT(IN)     :: string_a 
    !     type(VARYING_STRING),INTENT(IN) :: string_b 
    !     LOGICAL                         :: c_ne_s 
    !     INTEGER                         :: la,lb,ls
    !>>>
    USE ISO_VARYING_STRING
        type(VARYING_STRING) :: string_b
    	character(3) ::  string_a = "12A" 
    string_b = "123"
    if(string_a /= string_b) then
       test15 = 0
    else
       test15 = 1
    endif
    end function test15
     
    integer function test16()
    ! ELEMENTAL FUNCTION s_lt_s(string_a,string_b)  ! string<string
    !     type(VARYING_STRING),INTENT(IN) :: string_a,string_b 
    !     LOGICAL                         :: s_lt_s 
    !     INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
        type(VARYING_STRING) :: string_a , string_b  
     string_a = "123"
     string_b = "234"
    if(string_a < string_b) then
       test16 = 0
    else
       test16 = 1
    endif
    end function test16
     
    integer function test17()
    ! ELEMENTAL FUNCTION s_lt_c(string_a,string_b)  ! string<character 
    !     type(VARYING_STRING),INTENT(IN) :: string_a 
    !     CHARACTER(LEN=*),INTENT(IN)     :: string_b 
    !     LOGICAL                         :: s_lt_c 
    !     INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
        type(VARYING_STRING) :: string_a 
     character(3) :: string_b = "234"
     string_a = "123"
    if(string_a < string_b) then
       test17 = 0
    else
       test17 = 1
    endif
    end function test17
     
    integer function test18()
    ! ELEMENTAL FUNCTION c_lt_s(string_a,string_b)  ! character<string
    !     CHARACTER(LEN=*),INTENT(IN)     :: string_a 
    !     type(VARYING_STRING),INTENT(IN) :: string_b 
    !     LOGICAL                         :: c_lt_s 
    !     INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
        type(VARYING_STRING) :: string_b 
     character(3) :: string_a = "123"
     string_b = "124"
    if(string_a < string_b) then
       test18 = 0
    else
       test18 = 1
    endif
    end function test18
     
    integer function test19()
    ! ELEMENTAL FUNCTION s_le_s(string_a,string_b)  ! string<=string 
    !     type(VARYING_STRING),INTENT(IN) :: string_a,string_b 
    !     LOGICAL                         :: s_le_s 
    !     INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
        type(VARYING_STRING) :: string_a , string_b  
     string_a = "123"
     string_b = "123"
    if(string_a <= string_b) then
       test19 = 0
    else
       test19 = 1
    endif
    end function test19
     
    integer function test20()
    ! ELEMENTAL FUNCTION s_le_c(string_a,string_b)  ! string<=character
    !     type(VARYING_STRING),INTENT(IN) :: string_a 
    !     CHARACTER(LEN=*),INTENT(IN)     :: string_b 
    !     LOGICAL                         :: s_le_c 
    !     INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
        type(VARYING_STRING) :: string_a 
     character(3) :: string_b = "123"
     string_a = "123"
    if(string_a <= string_b) then
       test20 = 0
    else
       test20 = 1
    endif
    end function test20
     
    integer function test21()
    ! ELEMENTAL FUNCTION c_le_s(string_a,string_b)  ! character<=string 
    !     CHARACTER(LEN=*),INTENT(IN)     :: string_a 
    !     type(VARYING_STRING),INTENT(IN) :: string_b 
    !     LOGICAL                         :: c_le_s 
    !     INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
        type(VARYING_STRING) :: string_b 
     character(3) :: string_a = "123"
     string_b = "123"
    if(string_a <= string_b) then
       test21 = 0
    else
       test21 = 1
    endif
    end function test21
     
    integer function test22()
    ! ELEMENTAL FUNCTION s_ge_s(string_a,string_b)  ! string>=string
    !     type(VARYING_STRING),INTENT(IN) :: string_a,string_b 
    !     LOGICAL                         :: s_ge_s 
    !     INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
        type(VARYING_STRING) :: string_a , string_b  
     string_a = "123"
     string_b = "123"
    if(string_a >= string_b) then
       test22 = 0
    else
       test22 = 1
    endif
    end function test22
     
    integer function test23()
    ! ELEMENTAL FUNCTION s_ge_c(string_a,string_b)  ! string>=character 
    !     type(VARYING_STRING),INTENT(IN) :: string_a 
    !     CHARACTER(LEN=*),INTENT(IN)     :: string_b 
    !     LOGICAL                         :: s_ge_c 
    !     INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
        type(VARYING_STRING) :: string_a 
     character(3) :: string_b = "123"
     string_a = "123"
    if(string_a >= string_b) then
       test23 = 0
    else
       test23 = 1
    endif
    end function test23
     
    integer function test24()
    ! ELEMENTAL FUNCTION c_ge_s(string_a,string_b)  ! character>=string
    !     CHARACTER(LEN=*),INTENT(IN)     :: string_a 
    !     type(VARYING_STRING),INTENT(IN) :: string_b 
    !     LOGICAL                         :: c_ge_s 
    !     INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
        type(VARYING_STRING) :: string_b 
     character(3) :: string_a = "123"
     string_b = "123"
    if(string_a >= string_b) then
       test24 = 0
    else
       test24 = 1
    endif
    end function test24
     
    integer function test25()
    ! ELEMENTAL FUNCTION s_gt_s(string_a,string_b)  ! string>string 
    !     type(VARYING_STRING),INTENT(IN) :: string_a,string_b 
    !     LOGICAL                         :: s_gt_s 
    !     INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
    type(VARYING_STRING) :: string_a, string_b
     string_a = "124"
     string_b = "123"
    if(string_a > string_b) then
       test25 = 0
    else
       test25 = 1
    endif
    end function test25
     
    integer function test26()
    ! ELEMENTAL FUNCTION s_gt_c(string_a,string_b)  ! string>character
    !     type(VARYING_STRING),INTENT(IN) :: string_a 
    !     CHARACTER(LEN=*),INTENT(IN)     :: string_b 
    !     LOGICAL                         :: s_gt_c 
    !     INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
        type(VARYING_STRING) :: string_a 
     character(3) :: string_b = "123"
     string_a = "124"
    if(string_a > string_b) then
       test26 = 0
    else
       test26 = 1
    endif
    end function test26
     
    integer function test27()
    ! ELEMENTAL FUNCTION c_gt_s(string_a,string_b)  ! character>string 
    !     CHARACTER(LEN=*),INTENT(IN)     :: string_a 
    !     type(VARYING_STRING),INTENT(IN) :: string_b 
    !     LOGICAL                         :: c_gt_s 
    !     INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
        type(VARYING_STRING) :: string_b 
     character(3) :: string_a = "124"
     string_b = "123"
    if(string_a > string_b) then
       test27 = 0
    else
       test27 = 1
    endif
    end function test27
     
    integer function test28()
    !ELEMENTAL FUNCTION s_llt_s(string_a,string_b)  ! string_a<string_b ISO-646 ordering 
    !    type(VARYING_STRING),INTENT(IN) :: string_a,string_b 
    !    LOGICAL                         :: s_llt_s 
    !    INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
    type(VARYING_STRING) :: string_a, string_b
     string_a = "121"
     string_b = "123"
    if(LLT(string_a, string_b)) then
       test28 = 0
    else
       test28 = 1
    endif
    end function test28
     
    integer function test29()
    !ELEMENTAL FUNCTION s_llt_c(string_a,string_b)   ! string_a<string_b ISO-646 ordering 
    !    type(VARYING_STRING),INTENT(IN) :: string_a 
    !    CHARACTER(LEN=*),INTENT(IN)     :: string_b 
    !    LOGICAL                         :: s_llt_c 
    !    INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
    type(VARYING_STRING) :: string_a
    character(3) :: string_b = "123"
     string_a = "121"
    if(LLT(string_a, string_b)) then
       test29 = 0
    else
       test29 = 1
    endif
    end function test29
     
    integer function test30()
    !ELEMENTAL FUNCTION c_llt_s(string_a,string_b)  ! string_a,string_b ISO-646 ordering
    !    CHARACTER(LEN=*),INTENT(IN)     :: string_a
    !    type(VARYING_STRING),INTENT(IN) :: string_b
    !    LOGICAL                         :: c_llt_s
    !    INTEGER                         :: ls,la,lb
    !>>>
    USE ISO_VARYING_STRING
    type(VARYING_STRING) :: string_b
    character(3) :: string_a = "123"
     string_b = "124"
    if(LLT(string_a, string_b)) then
       test30 = 0
    else
       test30 = 1
    endif
    end function test30
     
    integer function test31()
    !ELEMENTAL FUNCTION s_lle_s(string_a,string_b)  ! string_a<=string_b ISO-646 ordering 
    !    type(VARYING_STRING),INTENT(IN) :: string_a,string_b 
    !    LOGICAL                         :: s_lle_s 
    !    INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
    type(VARYING_STRING) :: string_a, string_b
     string_a = "121"
     string_b = "123"
    if(LLE(string_a, string_b)) then
       test31 = 0
    else
       test31 = 1
    endif
    end function test31
     
    integer function test32()
    !ELEMENTAL FUNCTION s_lle_c(string_a,string_b)  ! strung_a<=string_b ISO-646 ordering
    !    type(VARYING_STRING),INTENT(IN) :: string_a 
    !    CHARACTER(LEN=*),INTENT(IN)     :: string_b 
    !    LOGICAL                         :: s_lle_c 
    !    INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
    type(VARYING_STRING) :: string_a
    character(3) :: string_b = "123"
     string_a = "121"
    if(LLE(string_a, string_b)) then
       test32 = 0
    else
       test32 = 1
    endif
    end function test32
     
    integer function test33()
    !ELEMENTAL FUNCTION c_lle_s(string_a,string_b)  ! string_a<=string_b ISO-646 ordering 
    !    CHARACTER(LEN=*),INTENT(IN)     :: string_a 
    !    type(VARYING_STRING),INTENT(IN) :: string_b 
    !    LOGICAL                         :: c_lle_s 
    !    INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
    type(VARYING_STRING) :: string_b
    character(3) :: string_a = "121"
     string_b = "123"
    if(LLT(string_a, string_b)) then
       test33 = 0
    else
       test33 = 1
    endif
    end function test33
     
    integer function test34()
    !ELEMENTAL FUNCTION s_lge_s(string_a,string_b)  ! string_a>=string_b ISO-646 ordering 
    !    type(VARYING_STRING),INTENT(IN) :: string_a,string_b 
    !    LOGICAL                         :: s_lge_s 
    !    INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
    type(VARYING_STRING) :: string_a, string_b
     string_a = "123"
     string_b = "123"
    if(LGE(string_a, string_b)) then
       test34 = 0
    else
       test34 = 1
    endif
    end function test34
     
    integer function test35()
    !ELEMENTAL FUNCTION s_lge_c(string_a,string_b)  ! string_a>=string_b ISO-646 ordering
    !    type(VARYING_STRING),INTENT(IN) :: string_a 
    !    CHARACTER(LEN=*),INTENT(IN)     :: string_b 
    !    LOGICAL                         :: s_lge_c 
    !    INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
    type(VARYING_STRING) :: string_a
     character(3) :: string_b = "123"
     string_a = "123"
    if(LGE(string_a, string_b)) then
       test35 = 0
    else
       test35 = 1
    endif
    end function test35
     
    integer function test36()
    !ELEMENTAL FUNCTION c_lge_s(string_a,string_b)  ! string_a>=string_b ISO-646 ordering 
    !    CHARACTER(LEN=*),INTENT(IN)     :: string_a 
    !    type(VARYING_STRING),INTENT(IN) :: string_b 
    !    LOGICAL                         :: c_lge_s 
    !    INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
    type(VARYING_STRING) :: string_b
     character(3) :: string_a = "123"
     string_b = "123"
    if(LGE(string_a, string_b)) then
       test36 = 0
    else
       test36 = 1
    endif
    end function test36
     
    integer function test37()
    !ELEMENTAL FUNCTION s_lgt_s(string_a,string_b)  ! string_a>string_b ISO-646 ordering 
    !    type(VARYING_STRING),INTENT(IN) :: string_a,string_b 
    !    LOGICAL                         :: s_lgt_s 
    !    INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
    type(VARYING_STRING) :: string_a, string_b
     string_a = "124"
     string_b = "123"
    if(LGT(string_a, string_b)) then
       test37 = 0
    else
       test37 = 1
    endif
    end function test37
     
    integer function test38()
    !ELEMENTAL FUNCTION s_lgt_c(string_a,string_b)  ! string_a>string_b ISO-646 ordering 
    !    type(VARYING_STRING),INTENT(IN) :: string_a 
    !    CHARACTER(LEN=*),INTENT(IN)     :: string_b 
    !    LOGICAL                         :: s_lgt_c 
    !    INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
    type(VARYING_STRING) :: string_a
     character(3) :: string_b = "123"
     string_a = "124"
    if(LGT(string_a, string_b)) then
       test38 = 0
    else
       test38 = 1
    endif
    end function test38
     
    integer function test39()
    !ELEMENTAL FUNCTION c_lgt_s(string_a,string_b)  ! string_a>string_b ISO-646 ordering
    !    CHARACTER(LEN=*),INTENT(IN)     :: string_a 
    !    type(VARYING_STRING),INTENT(IN) :: string_b 
    !    LOGICAL                         :: c_lgt_s 
    !    INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
    type(VARYING_STRING) :: string_b
     character(3) :: string_a = "124"
     string_b = "123"
    if(LGT(string_a, string_b)) then
       test39 = 0
    else
       test39 = 1
    endif
    end function test39
     
    integer function test40()
    ! ELEMENTAL FUNCTION insert_ss(string,start,substring)
    !     type(VARYING_STRING)            :: insert_ss
    !     type(VARYING_STRING),INTENT(IN) :: string
    !     INTEGER,INTENT(IN)              :: start
    !     type(VARYING_STRING),INTENT(IN) :: substring
    !     CHARACTER,POINTER,DIMENSION(:) :: work 
    !     INTEGER                        :: ip,is,lsub,ls 
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: string, substring, res
    string = "12345678"
    substring = "abcd"
    res = INSERT(string, 4, substring)
    if(res == VAR_STR("123abcd45678")) then
       test40 = 0
    else
       test40 = 1
    endif
    end function test40
     
    integer function test41()
    ! ELEMENTAL FUNCTION insert_sc(string,start,substring)
    !     type(VARYING_STRING)            :: insert_sc
    !     type(VARYING_STRING),INTENT(IN) :: string
    !     INTEGER,INTENT(IN)              :: start
    !     CHARACTER(LEN=*),INTENT(IN) :: substring
    !     CHARACTER,POINTER,DIMENSION(:) :: work 
    !     INTEGER                        :: ip,is,lsub,ls 
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: string, res
         character(4) :: substring = "abcd"
    string = "12345678"
    res = INSERT(string, 4, substring)
    if(res == VAR_STR("123abcd45678")) then
       test41 = 0
    else
       test41 = 1
    endif
    end function test41
     
    integer function test42()
    ! ELEMENTAL FUNCTION insert_cs(string,start,substring)
    !     type(VARYING_STRING)            :: insert_cs
    !     CHARACTER(LEN=*),INTENT(IN)     :: string
    !     INTEGER,INTENT(IN)              :: start
    !     type(VARYING_STRING),INTENT(IN) :: substring
    !     CHARACTER,POINTER,DIMENSION(:) :: work 
    !     INTEGER                        :: ip,is,lsub,ls 
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: substring, res
         character(8) :: string = "12345678"
    substring = "abcd"
    res = INSERT(string, 4, substring)
    if(res == VAR_STR("123abcd45678")) then
       test42 = 0
    else
       test42 = 1
    endif
    end function test42
     
    integer function test43()
    ! ELEMENTAL FUNCTION insert_cc(string,start,substring)
    !     type(VARYING_STRING)        :: insert_cc
    !     CHARACTER(LEN=*),INTENT(IN) :: string
    !     INTEGER,INTENT(IN)          :: start
    !     CHARACTER(LEN=*),INTENT(IN) :: substring
    !     CHARACTER,POINTER,DIMENSION(:) :: work 
    !     INTEGER                        :: ip,is,lsub,ls 
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: res
    	 character(4) :: substring = "abcd"
         character(8) :: string = "12345678"
    res = INSERT(string, 4, substring)
    if(res == VAR_STR("123abcd45678")) then
       test43 = 0
    else
       test43 = 1
    endif
    end function test43
     
    integer function test44()
    ! ELEMENTAL FUNCTION replace_ss(string,start,substring)
    !    type(VARYING_STRING)            :: replace_ss
    !    type(VARYING_STRING),INTENT(IN) :: string
    !    INTEGER,INTENT(IN)              :: start
    !    type(VARYING_STRING),INTENT(IN) :: substring
    !    CHARACTER,POINTER,DIMENSION(:) :: work
    !    INTEGER                        :: ip,is,nw,lsub,ls
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: string, substring, res
    string = "12345678"
    substring = "abcd"
    res = REPLACE(string, 4, substring)
    if(res == VAR_STR("123abcd8")) then
       test44 = 0
    else
       test44 = 1
    endif
    end function test44
     
    integer function test45()
    ! ELEMENTAL FUNCTION replace_ss_sf(string,start,finish,substring)
    !    type(VARYING_STRING)            :: replace_ss_sf
    !    type(VARYING_STRING),INTENT(IN) :: string
    !    INTEGER,INTENT(IN)              :: start,finish
    !    type(VARYING_STRING),INTENT(IN) :: substring
    !    CHARACTER,POINTER,DIMENSION(:) :: work
    !    INTEGER                        :: ip,is,if,nw,lsub,ls
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: string, substring, res
    string = "12345678"
    substring = "abcd"
    res = REPLACE(string, 4, 5, substring)
    if(res == VAR_STR("123abcd678")) then
       test45 = 0
    else
       test45 = 1
    endif
    end function test45
     
    integer function test46()
    !ELEMENTAL FUNCTION replace_sc(string,start,substring)
    !    type(VARYING_STRING)            :: replace_sc
    !    type(VARYING_STRING),INTENT(IN) :: string
    !    INTEGER,INTENT(IN)              :: start
    !    CHARACTER(LEN=*),INTENT(IN)     :: substring
    !    CHARACTER,POINTER,DIMENSION(:) :: work
    !    INTEGER                        :: ip,is,nw,lsub,ls
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: string, res
    character(4) :: substring = "abcd"
    string = "12345678"
    res = REPLACE(string, 4, substring)
    if(res == VAR_STR("123abcd8")) then
       test46 = 0
    else
       test46 = 1
    endif
    end function test46
     
    integer function test47()
    !ELEMENTAL FUNCTION replace_sc_sf(string,start,finish,substring)
    !    type(VARYING_STRING)            :: replace_sc_sf
    !    type(VARYING_STRING),INTENT(IN) :: string
    !    INTEGER,INTENT(IN)              :: start,finish
    !    CHARACTER(LEN=*),INTENT(IN)     :: substring
    !    CHARACTER,POINTER,DIMENSION(:) :: work
    !    INTEGER                        :: ip,is,if,nw,lsub,ls
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: string, res
    character(4) :: substring = "abcd"
    string = "12345678"
    res = REPLACE(string, 4, 5, substring)
    if(res == VAR_STR("123abcd678")) then
       test47 = 0
    else
       test47 = 1
    endif
    end function test47
     
    integer function test48()
    !ELEMENTAL FUNCTION replace_cs(string,start,substring)
    !    type(VARYING_STRING)            :: replace_cs
    !    CHARACTER(LEN=*),INTENT(IN)     :: string
    !    INTEGER,INTENT(IN)              :: start
    !    type(VARYING_STRING),INTENT(IN) :: substring
    !    CHARACTER,POINTER,DIMENSION(:) :: work
    !    INTEGER                        :: ip,is,nw,lsub,ls
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: substring, res
    character(8) :: string = "12345678"
    substring = "abcd"
    res = REPLACE(string, 4, substring)
    if(res == VAR_STR("123abcd8")) then
       test48 = 0
    else
       test48 = 1
    endif
    end function test48
     
    integer function test49()
    !ELEMENTAL FUNCTION replace_cs_sf(string,start,finish,substring)
    !    type(VARYING_STRING)            :: replace_cs_sf
    !    CHARACTER(LEN=*),INTENT(IN)     :: string
    !    INTEGER,INTENT(IN)              :: start,finish
    !    type(VARYING_STRING),INTENT(IN) :: substring
    !    CHARACTER,POINTER,DIMENSION(:) :: work
    !    INTEGER                        :: ip,is,if,nw,lsub,ls
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: substring, res
    character(8) :: string = "12345678"
    substring = "abcd"
    res = REPLACE(string, 4, 5,  substring)
    if(res == VAR_STR("123abcd678")) then
       test49 = 0
    else
       test49 = 1
    endif
    end function test49
     
    integer function test50()
    !ELEMENTAL FUNCTION replace_cc(string,start,substring)
    !    type(VARYING_STRING)            :: replace_cc
    !    CHARACTER(LEN=*),INTENT(IN)     :: string
    !    INTEGER,INTENT(IN)              :: start
    !    CHARACTER(LEN=*),INTENT(IN)     :: substring
    !    CHARACTER,POINTER,DIMENSION(:) :: work
    !    INTEGER                        :: ip,is,nw,lsub,ls
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) ::  res
    character(8) :: string = "12345678"
    character(4) ::substring = "abcd"
    res = REPLACE(string, 4, substring)
    if(res == VAR_STR("123abcd8")) then
       test50 = 0
    else
       test50 = 1
    endif
    end function test50
     
    integer function test51()
    !ELEMENTAL FUNCTION replace_cc_sf(string,start,finish,substring)
    !    type(VARYING_STRING)            :: replace_cc_sf
    !    CHARACTER(LEN=*),INTENT(IN)     :: string
    !    INTEGER,INTENT(IN)              :: start,finish
    !    CHARACTER(LEN=*),INTENT(IN)     :: substring
    !    CHARACTER,POINTER,DIMENSION(:) :: work
    !    INTEGER                        :: ip,is,if,nw,lsub,ls
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) ::  res
    character(8) :: string = "12345678"
    character(4) ::substring = "abcd"
    res = REPLACE(string, 4, 5, substring)
    if(res == VAR_STR("123abcd678")) then
       test51 = 0
    else
       test51 = 1
    endif
    end function test51
     
    integer function test52()
    !ELEMENTAL FUNCTION replace_sss(string,target,substring,every,back)
    !    type(VARYING_STRING)            :: replace_sss
    !    type(VARYING_STRING),INTENT(IN) :: string,target,substring
    !    LOGICAL,INTENT(IN),OPTIONAL     :: every,back
    !    LOGICAL                        :: dir_switch, rep_search
    !    CHARACTER,DIMENSION(:),POINTER :: work,temp
    !    INTEGER                        :: ls,lt,lsub,ipos,ipow
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: string, target, substring, res
    string = "123A45A678"
    target = "A"
    substring = "abcd"
    res = REPLACE(string, target, substring, .TRUE., .FALSE.)
    if(res == VAR_STR("123abcd45abcd678")) then
       test52 = 0
    else
       test52 = 1
    endif
    end function test52
     
    integer function test53()
    !ELEMENTAL FUNCTION replace_ssc(string,target,substring,every,back)
    !    type(VARYING_STRING)            :: replace_ssc
    !    type(VARYING_STRING),INTENT(IN) :: string,target
    !    CHARACTER(LEN=*),INTENT(IN)     :: substring
    !    LOGICAL,INTENT(IN),OPTIONAL     :: every,back
    !    LOGICAL                        :: dir_switch, rep_search
    !    CHARACTER,DIMENSION(:),POINTER :: work,temp
    !    INTEGER                        :: ls,lt,lsub,ipos,ipow
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: string, target, res
    character(4) :: substring = "abcd"
    string = "123A45A678"
    target = "A"
    res = REPLACE(string, target, substring, .TRUE., .FALSE.)
    if(res == VAR_STR("123abcd45abcd678")) then
       test53 = 0
    else
       test53 = 1
    endif
    end function test53
     
    integer function test54()
    !ELEMENTAL FUNCTION replace_scs(string,target,substring,every,back)
    !    type(VARYING_STRING)            :: replace_scs
    !    type(VARYING_STRING),INTENT(IN) :: string,substring
    !    CHARACTER(LEN=*),INTENT(IN)     :: target
    !    LOGICAL,INTENT(IN),OPTIONAL     :: every,back
    !    LOGICAL                        :: dir_switch, rep_search
    !    CHARACTER,DIMENSION(:),POINTER :: work,temp,tget
    !    INTEGER                        :: ls,lt,lsub,ipos,ipow
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: string, substring, res
    character(1) :: target = "A"
     
    substring = "abcd"
    string = "123A45A678"
    res = REPLACE(string, target, substring, .TRUE., .FALSE.)
    if(res == VAR_STR("123abcd45abcd678")) then
       test54 = 0
    else
       test54 = 1
    endif
    end function test54
     
    integer function test55()
    !ELEMENTAL FUNCTION replace_scc(string,target,substring,every,back)
    !    type(VARYING_STRING)            :: replace_scc
    !    type(VARYING_STRING),INTENT(IN) :: string
    !    CHARACTER(LEN=*),INTENT(IN)     :: target,substring
    !    LOGICAL,INTENT(IN),OPTIONAL     :: every,back
    !    LOGICAL                        :: dir_switch, rep_search
    !    CHARACTER,DIMENSION(:),POINTER :: work,temp,tget
    !    INTEGER                        :: ls,lt,lsub,ipos,ipow
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: string, res
    character(1) :: target = "A"
    character(4) :: substring = "abcd"
    string = "123A45A678"
    res = REPLACE(string, target, substring, .TRUE., .FALSE.)
    if(res == VAR_STR("123abcd45abcd678")) then
       test55 = 0
    else
       test55 = 1
    endif
    end function test55
     
    integer function test56()
    !ELEMENTAL FUNCTION replace_css(string,target,substring,every,back)
    !    type(VARYING_STRING)            :: replace_css
    !    CHARACTER(LEN=*),INTENT(IN)     :: string
    !    type(VARYING_STRING),INTENT(IN) :: target,substring
    !    LOGICAL,INTENT(IN),OPTIONAL     :: every,back
    !    LOGICAL                        :: dir_switch, rep_search
    !    CHARACTER,DIMENSION(:),POINTER :: work,temp,str
    !    INTEGER                        :: ls,lt,lsub,ipos,ipow
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: target, substring, res
    character(10) :: string = "123A45A678"
    target = "A"
    substring = "abcd"
    res = REPLACE(string, target, substring, .TRUE., .FALSE.)
    if(res == VAR_STR("123abcd45abcd678")) then
       test56 = 0
    else
       test56 = 1
    endif
    end function test56
     
    integer function test57()
    !ELEMENTAL FUNCTION replace_csc(string,target,substring,every,back)
    !    type(VARYING_STRING)            :: replace_csc
    !    type(VARYING_STRING),INTENT(IN) :: target
    !    CHARACTER(LEN=*),INTENT(IN)     :: string,substring
    !    LOGICAL,INTENT(IN),OPTIONAL     :: every,back
    !    LOGICAL                        :: dir_switch, rep_search
    !    CHARACTER,DIMENSION(:),POINTER :: work,temp,str
    !    INTEGER                        :: ls,lt,lsub,ipos,ipow
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: target, res
    character(10) :: string = "123A45A678"
    character(4) :: substring = "abcd"
    target = "A"
    res = REPLACE(string, target, substring, .TRUE., .FALSE.)
    if(res == VAR_STR("123abcd45abcd678")) then
       test57 = 0
    else
       test57 = 1
    endif
    end function test57
     
    integer function test58()
    !ELEMENTAL FUNCTION replace_ccs(string,target,substring,every,back)
    !    type(VARYING_STRING)            :: replace_ccs
    !    type(VARYING_STRING),INTENT(IN) :: substring
    !    CHARACTER(LEN=*),INTENT(IN)     :: string,target
    !    LOGICAL,INTENT(IN),OPTIONAL     :: every,back
    !    LOGICAL                        :: dir_switch, rep_search
    !    CHARACTER,DIMENSION(:),POINTER :: work,temp
    !    INTEGER                        :: ls,lt,lsub,ipos,ipow
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: substring, res
    character(10) :: string = "123A45A678"
    character(1) :: target = "A"
    substring = "abcd"
    res = REPLACE(string, target, substring, .TRUE., .FALSE.)
    if(res == VAR_STR("123abcd45abcd678")) then
       test58 = 0
    else
       test58 = 1
    endif
    end function test58
     
    integer function test59()
    !ELEMENTAL FUNCTION replace_ccc(string,target,substring,every,back)
    !    type(VARYING_STRING)            :: replace_ccc
    !    CHARACTER(LEN=*),INTENT(IN)     :: string,target,substring
    !    LOGICAL,INTENT(IN),OPTIONAL     :: every,back
    !    LOGICAL                        :: dir_switch, rep_search
    !    CHARACTER,DIMENSION(:),POINTER :: work,temp
    !    INTEGER                        :: ls,lt,lsub,ipos,ipow
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: res
    character(10) :: string = "123A45A678"
    character(1) :: target = "A"
    character(4) :: substring = "abcd"
    res = REPLACE(string, target, substring, .TRUE., .FALSE.)
    if(res == VAR_STR("123abcd45abcd678")) then
       test59 = 0
    else
       test59 = 1
    endif
    end function test59
     
    integer function test60()
    !ELEMENTAL FUNCTION remove_s(string,start,finish)
    !    type(VARYING_STRING)            :: remove_s
    !    type(VARYING_STRING),INTENT(IN) :: string
    !    INTEGER,INTENT(IN),OPTIONAL     :: start
    !    INTEGER,INTENT(IN),OPTIONAL     :: finish
    !    CHARACTER,DIMENSION(:),POINTER :: arg_str
    !    INTEGER                        :: is,if,ls
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: string, res
    string = "12345678"
    res = REMOVE(string, 5, 7)
    if(res == VAR_STR("12348")) then
       test60 = 0
    else
       test60 = 1
    endif
    end function test60
     
    integer function test61()
    !ELEMENTAL FUNCTION remove_c(string,start,finish)
    !    type(VARYING_STRING)        :: remove_c
    !    CHARACTER(LEN=*),INTENT(IN) :: string
    !    INTEGER,INTENT(IN),OPTIONAL :: start
    !    INTEGER,INTENT(IN),OPTIONAL :: finish
    !    CHARACTER,DIMENSION(:),POINTER :: arg_str
    !    INTEGER                        :: is,if,ls
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) ::  res
    character(8) ::string = "12345678"
    res = REMOVE(string, 5, 7)
    if(res == VAR_STR("12348")) then
       test61 = 0
    else
       test61 = 1
    endif
    end function test61
     
    integer function test62()
    !ELEMENTAL FUNCTION extract_s(string,start,finish) 
    !     type(VARYING_STRING),INTENT(IN) :: string 
    !     INTEGER,INTENT(IN),OPTIONAL     :: start     
    !     INTEGER,INTENT(IN),OPTIONAL     :: finish     
    !     type(VARYING_STRING)            :: extract_s 
    !     INTEGER                         :: is,if 
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: string, res
    string = "12345678"
    res = EXTRACT(string, 5, 7)
    if(res == VAR_STR("567")) then
       test62 = 0
    else
       test62 = 1
    endif
    end function test62
     
    integer function test63()
    !ELEMENTAL FUNCTION extract_c(string,start,finish)
    !     CHARACTER(LEN=*),INTENT(IN) :: string 
    !     INTEGER,INTENT(IN),OPTIONAL :: start   
    !     INTEGER,INTENT(IN),OPTIONAL :: finish  
    !     type(VARYING_STRING)        :: extract_c 
    !     INTEGER                      :: is,if 
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: res
    character(8) :: string = "12345678"
    res = EXTRACT(string, 5, 7)
    if(res == VAR_STR("567")) then
       test63 = 0
    else
       test63 = 1
    endif
    end function test63
     
    integer function test64()
    !ELEMENTAL SUBROUTINE split_s(string,word,set,separator,back)
    !     type(VARYING_STRING),INTENT(INOUT)        :: string
    !     type(VARYING_STRING),INTENT(OUT)          :: word
    !     type(VARYING_STRING),INTENT(IN)           :: set
    !     type(VARYING_STRING),INTENT(OUT),OPTIONAL :: separator
    !     LOGICAL,INTENT(IN),OPTIONAL               :: back
    !     LOGICAL           :: dir_switch 
    !     INTEGER           :: ls,tpos
    !     CHARACTER,ALLOCATABLE :: wst(:) ! working copy of string
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: string, word, set, separator
    string = "123a45678"
    set = "ab"
    call SPLIT(string, word, set, separator, .FALSE.)
    if((word == VAR_STR("123"))       .and.   &
       (string ==VAR_STR("45678"))   .and.   &
       (separator == VAR_STR("a"))) then
         test64 = 0
    else
         test64 = 1
    endif
    end function test64
     
    integer function test65()
    !ELEMENTAL SUBROUTINE split_c(string,word,set,separator,back)
    !     type(VARYING_STRING),INTENT(INOUT)        :: string
    !     type(VARYING_STRING),INTENT(OUT)          :: word
    !     CHARACTER(LEN=*),INTENT(IN)               :: set
    !     type(VARYING_STRING),INTENT(OUT),OPTIONAL :: separator
    !     LOGICAL,INTENT(IN),OPTIONAL               :: back
    !     LOGICAL                    :: dir_switch 
    !     INTEGER                    :: ls,tpos,lset
    !     CHARACTER,ALLOCATABLE :: wst(:) ! working copy of string
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: string, word, separator
         character(2) :: set = "ab"
    string = "123a45678"
    call SPLIT(string, word, set, separator, .FALSE.)
    if((word == VAR_STR("123"))      .and.   &
       (string ==VAR_STR("45678"))   .and.   &
       (separator == VAR_STR("a"))) then
         test65 = 0
    else
         test65 = 1
    endif
    end function test65
     
    integer function test66()
    ! ELEMENTAL FUNCTION index_ss(string,substring,back) 
    !     type(VARYING_STRING),INTENT(IN) :: string,substring 
    !     LOGICAL,INTENT(IN),OPTIONAL     :: back 
    !     INTEGER                         :: index_ss 
    !     LOGICAL                         :: dir_switch 
    !     INTEGER                         :: ls,lsub 
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: string, substring
         integer res
    string =   "abcdefghijk"
    substring= "def" 
    res  = INDEX(string, substring, .FALSE.)
    if(res==4) then
       test66 = 0
    else
       test66 = 1
    endif
    end function test66
     
    integer function test67()
    ! ELEMENTAL FUNCTION index_sc(string,substring,back)
    !     type(VARYING_STRING),INTENT(IN) :: string 
    !     CHARACTER(LEN=*),INTENT(IN)     :: substring 
    !     LOGICAL,INTENT(IN),OPTIONAL     :: back 
    !     INTEGER                         :: index_sc 
    !     LOGICAL                         :: dir_switch,matched 
    !     INTEGER                         :: ls,lsub 
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: string
         integer res    
         character :: substring= "def" 
    string =   "abcdefghijk"
    res  = INDEX(string, substring, .FALSE.)
    if(res==4) then
       test67 = 0
    else
       test67 = 1
    endif
    end function test67
     
    integer function test68()
    ! ELEMENTAL FUNCTION index_cs(string,substring,back)
    !     CHARACTER(LEN=*),INTENT(IN)     :: string 
    !     type(VARYING_STRING),INTENT(IN) :: substring 
    !     LOGICAL,INTENT(IN),OPTIONAL     :: back 
    !     INTEGER                         :: index_cs 
    !     LOGICAL                         :: dir_switch,matched 
    !     INTEGER                         :: ls,lsub 
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: substring
         integer res
    character(10) :: string =   "abcdefghijk"
    substring= "def" 
    res  = INDEX(string, substring, .FALSE.)
    if(res==4) then
       test68 = 0
    else
       test68 = 1
    endif
    end function test68
     
    integer function test69()
    ! ELEMENTAL FUNCTION scan_ss(string,set,back) 
    !     type(VARYING_STRING),INTENT(IN) :: string,set 
    !     LOGICAL,INTENT(IN),OPTIONAL     :: back 
    !     INTEGER                         :: scan_ss 
    !     LOGICAL                         :: dir_switch 
    !     INTEGER                         :: ls 
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: string, set
         integer res
    string =   "abcdefghijk"
    set= "def" 
    res  = SCAN(string, set, .FALSE.)
    if(res==4) then
       test69 = 0
    else
       test69 = 1
    endif
    end function test69
     
    integer function test70()
    ! ELEMENTAL FUNCTION scan_sc(string,set,back)
    !     type(VARYING_STRING),INTENT(IN) :: string 
    !     CHARACTER(LEN=*),INTENT(IN)     :: set 
    !     LOGICAL,INTENT(IN),OPTIONAL     :: back 
    !     INTEGER                         :: scan_sc 
    !     LOGICAL                         :: dir_switch,matched 
    !     INTEGER                         :: ls 
    !>>>
    USE ISO_VARYING_STRING
         integer res    
         type(VARYING_STRING) :: string  
         character(3) :: set = "def" 
    string =   "abcdefghijk"
    res  = SCAN(string, set, .FALSE.)
    if(res==4) then
       test70 = 0
    else
       test70 = 1
    endif
    end function test70
     
    integer function test71()
    ! ELEMENTAL FUNCTION scan_cs(string,set,back)
    !     CHARACTER(LEN=*),INTENT(IN)     :: string 
    !     type(VARYING_STRING),INTENT(IN) :: set 
    !     LOGICAL,INTENT(IN),OPTIONAL     :: back 
    !     INTEGER                         :: scan_cs 
    !     LOGICAL                         :: dir_switch,matched 
    !     INTEGER                         :: ls 
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: set 
         integer res
         character(10) :: string =   "abcdefghijk"
    set = "def" 
    res  = SCAN(string, set, .FALSE.)
    if(res==4) then
       test71 = 0
    else
       test71 = 1
    endif
    end function test71
     
    integer function test72()
    ! ELEMENTAL FUNCTION verify_ss(string,set,back) 
    !     type(VARYING_STRING),INTENT(IN) :: string,set 
    !     LOGICAL,INTENT(IN),OPTIONAL     :: back 
    !     INTEGER                         :: verify_ss 
    !     LOGICAL                     :: dir_switch 
    !     INTEGER                     :: ls 
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: string, set
         integer res
    string =   "abcdefghijk"
    set= "abc" 
    res  = VERIFY(string, set, .FALSE.)
    if(res==4) then
       test72 = 0
    else
       test72 = 1
    endif
    end function test72
     
    integer function test73()
    ! ELEMENTAL FUNCTION verify_sc(string,set,back)
    !     type(VARYING_STRING),INTENT(IN) :: string 
    !     CHARACTER(LEN=*),INTENT(IN)     :: set 
    !     LOGICAL,INTENT(IN),OPTIONAL     :: back 
    !     INTEGER                         :: verify_sc 
    !     LOGICAL                     :: dir_switch
    !     INTEGER                     :: ls 
    !>>>
    USE ISO_VARYING_STRING
         integer res    
         type(VARYING_STRING) :: string  
         character(3) :: set = "abc" 
    string =   "abcdefghijk"
    res  = VERIFY(string, set, .FALSE.)
    if(res==4) then
       test73 = 0
    else
       test73 = 1
    endif
    end function test73
     
    integer function test74()
    ! ELEMENTAL FUNCTION verify_cs(string,set,back)
    !     CHARACTER(LEN=*),INTENT(IN)     :: string 
    !     type(VARYING_STRING),INTENT(IN) :: set 
    !     LOGICAL,INTENT(IN),OPTIONAL     :: back 
    !     INTEGER                         :: verify_cs 
    !     LOGICAL                     :: dir_switch
    !     INTEGER                     :: ls 
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: set 
         integer res
         character(10) :: string =   "abcdefghijk"
    set = "abc" 
    res  = VERIFY(string, set, .FALSE.)
    if(res==4) then
       test74 = 0
    else
       test74 = 1
    endif
    end function test74
     
    integer function test75()
    !ELEMENTAL FUNCTION len_trim_s(string) 
    !    type(VARYING_STRING),INTENT(IN) :: string 
    !    INTEGER                         :: len_trim_s 
    !    INTEGER                         :: ls 
    !>>>
    USE ISO_VARYING_STRING
         integer res
         type(VARYING_STRING) :: string
    string = "abc   "
    res = LEN_TRIM(string)	  
    if(res==3) then
       test75 = 0
    else
       test75 = 1
    endif
    end function test75
     
    integer function test76()
    !ELEMENTAL FUNCTION trim_s(string) 
    !    type(VARYING_STRING),INTENT(IN)  :: string 
    !    type(VARYING_STRING)             :: trim_s 
    !    INTEGER                      :: ls,pos 
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: string, res
    string = "abc   "
    res = TRIM(string)	  
    if((LEN(res)==3) .and. (res==VAR_STR("abc"))) then
       test76 = 0
    else
       test76 = 1
    endif
    end function test76
     
    integer function test77()
    !ELEMENTAL FUNCTION iachar_s(string) 
    !    type(VARYING_STRING),INTENT(IN) :: string 
    !    INTEGER                         :: iachar_s 
    !    iachar_s = IACHAR(CHAR(string)) 
    !   ENDFUNCTION iachar_s 
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: c
    c = "Y"
    if(IACHAR(c) == 89) then
       test77 = 0
    else
       test77 = 1
    endif
    end function test77
     
    integer function test78()
    !ELEMENTAL FUNCTION ichar_s(string) 
    !    type(VARYING_STRING),INTENT(IN) :: string 
    !    INTEGER                         :: ichar_s 
    !    ichar_s = ICHAR(CHAR(string)) 
    !   ENDFUNCTION ichar_s 
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: c
    c = "Y"
    if(ICHAR(c) == 89) then
       test78 = 0
    else
       test78 = 1
    endif
    end function test78
     
    integer function test79()
    !ELEMENTAL FUNCTION adjustl_s(string) 
    !    type(VARYING_STRING),INTENT(IN) :: string 
    !    type(VARYING_STRING)            :: adjustl_s 
    !    INTEGER                         :: ls,pos 
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: string, res
    string = "   abcdef"
    res = ADJUSTL(string)
    if(res == VAR_STR("abcdef   ")) then
       test79 = 0
    else
       test79 = 1
    endif
    end function test79
     
    integer function test80()
    !ELEMENTAL FUNCTION adjustr_s(string) 
    !    type(VARYING_STRING),INTENT(IN) :: string 
    !    type(VARYING_STRING)            :: adjustr_s 
    !    INTEGER                         :: ls,pos 
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: string, res
    string = "abcdef   "
    res = ADJUSTR(string)
    if(res == VAR_STR("   abcdef")) then
       test80 = 0
    else
       test80 = 1
    endif
    end function test80
     
    Program iso_var_unit_tests
     integer errors(80), i
      external test1, test2,test3,test4,test5
      external test6, test7,test8,test9,test10
      external test11, test12,test13,test14,test15
      external test16, test17,test18,test19,test20
      external test21, test22,test23,test24,test25
      external test26, test27,test28,test29,test30
      external test31, test32,test33,test34,test35
      external test36, test37,test38,test39,test40
      external test41, test42,test43,test44,test45
      external test46, test47,test48,test49,test50
      external test51, test52,test53,test54,test55
      external test56, test57,test58,test59,test60
      external test61, test62,test63,test64,test65
      external test66, test67,test68,test69,test70
      external test71, test72,test73,test74,test75
      external test76, test77,test78,test79,test80
     
      integer test1, test2,test3,test4,test5
      integer test6, test7,test8,test9,test10
      integer test11, test12,test13,test14,test15
      integer test16, test17,test18,test19,test20
      integer test21, test22,test23,test24,test25
      integer test26, test27,test28,test29,test30
      integer test31, test32,test33,test34,test35
      integer test36, test37,test38,test39,test40
      integer test41, test42,test43,test44,test45
      integer test46, test47,test48,test49,test50
      integer test51, test52,test53,test54,test55
      integer test56, test57,test58,test59,test60
      integer test61, test62,test63,test64,test65
      integer test66, test67,test68,test69,test70
      integer test71, test72,test73,test74,test75
      integer test76, test77,test78,test79,test80
     
      errors(1) = test1()
      errors(2) = test2()
      errors(3) = test3()
      errors(4) = test4()
      errors(5) = test5()
      errors(6) = test6()
      errors(7) = test7()
      errors(8) = test8()
      errors(9) = test9()
      errors(10) = test10()
      errors(11) = test11()
      errors(12) = test12()
      errors(13) = test13()
      errors(14) = test14()
      errors(15) = test15()
      errors(16) = test16()
      errors(17) = test17()
      errors(18) = test18()
      errors(19) = test19()
      errors(20) = test20()
      errors(21) = test21()
      errors(22) = test22()
      errors(23) = test23()
      errors(24) = test24()
      errors(25) = test25()
      errors(26) = test26()
      errors(27) = test27()
      errors(28) = test28()
      errors(29) = test29()
      errors(30) = test30()
      errors(31) = test31()
      errors(32) = test32()
      errors(33) = test33()
      errors(34) = test34()
      errors(35) = test35()
      errors(36) = test36()
      errors(37) = test37()
      errors(38) = test38()
      errors(39) = test39()
      errors(40) = test40()
      errors(41) = test41()
      errors(42) = test42()
      errors(43) = test43()
      errors(44) = test44()
      errors(45) = test45()
      errors(46) = test46()
      errors(47) = test47()
      errors(48) = test48()
      errors(49) = test49()
      errors(50) = test50()
      errors(51) = test51()
      errors(52) = test52()
      errors(53) = test53()
      errors(54) = test54()
      errors(55) = test55()
      errors(56) = test56()
      errors(57) = test57()
      errors(58) = test58()
      errors(59) = test59()
      errors(60) = test60()
      errors(61) = test61()
      errors(62) = test62()
      errors(63) = test63()
      errors(64) = test64()
      errors(65) = test65()
      errors(66) = test66()
      errors(67) = test67()
      errors(68) = test68()
      errors(69) = test69()
      errors(70) = test70()
      errors(71) = test71()
      errors(72) = test72()
      errors(73) = test73()
      errors(74) = test74()
      errors(75) = test75()
      errors(76) = test76()
      errors(77) = test77()
      errors(78) = test78()
      errors(79) = test79()
      errors(80) = test80()
      do i = 1,80
        if(errors(i) .eq. 0) then
          write(*,*) "PASS            TEST", i
        else
          write(*,*) "FAIL*********** TEST", i
        endif
      enddo   
    end Program iso_var_unit_tests
    Il dispose de fonctions utilitaires pour convertir en char( VAR_STR), ecriture fichier(PUT_LINE),lecture fichier(get_d_eor) entre autres et une panoplie d'autres.....
    Il suffit de declarer une variable du type -car c'est un type-comme suit :
    -type(VARYING_STRING) :: string
    bon code.....

  6. #6
    Membre averti
    Inscrit en
    Juillet 2007
    Messages
    19
    Détails du profil
    Informations forums :
    Inscription : Juillet 2007
    Messages : 19
    Par défaut
    Citation Envoyé par MABROUKI Voir le message
    Bonjour LeSnul
    Tu peux traiter des "string variable length" à l'aide du module fortran public Isovar.f90.

    Regarde ce lien de l'auteur redacteur du module & membre du standard committee :document has been prepared by [email]J.L.Schonfelder

    http://www.google.fr/url?sa=t&source...N7GMP-K57engUA
    Ce module source est repris par Visual Fortran Compaq 6.6.

    Sur ce lien le source code du module public:
    http://www.google.fr/url?sa=t&source...t5q7an6gsNc76g

    ici un code exemple qui teste quelques fonction de ce module fourni sous Visual Fortran Compaq :program iso_var_unit_tests.f90
    Le module Isovar s'appelle dans cet exemple ISO_VARYING_STRING.f90
    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
    1144
    1145
    1146
    1147
    1148
    1149
    1150
    1151
    1152
    1153
    1154
    1155
    1156
    1157
    1158
    1159
    1160
    1161
    1162
    1163
    1164
    1165
    1166
    1167
    1168
    1169
    1170
    1171
    1172
    1173
    1174
    1175
    1176
    1177
    1178
    1179
    1180
    1181
    1182
    1183
    1184
    1185
    1186
    1187
    1188
    1189
    1190
    1191
    1192
    1193
    1194
    1195
    1196
    1197
    1198
    1199
    1200
    1201
    1202
    1203
    1204
    1205
    1206
    1207
    1208
    1209
    1210
    1211
    1212
    1213
    1214
    1215
    1216
    1217
    1218
    1219
    1220
    1221
    1222
    1223
    1224
    1225
    1226
    1227
    1228
    1229
    1230
    1231
    1232
    1233
    1234
    1235
    1236
    1237
    1238
    1239
    1240
    1241
    1242
    1243
    1244
    1245
    1246
    1247
    1248
    1249
    1250
    1251
    1252
    1253
    1254
    1255
    1256
    1257
    1258
    1259
    1260
    1261
    1262
    1263
    1264
    1265
    1266
    1267
    1268
    1269
    1270
    1271
    1272
    1273
    1274
    1275
    1276
    1277
    1278
    1279
    1280
    1281
    1282
    1283
    1284
    1285
    1286
    1287
    1288
    1289
    1290
    1291
    1292
    1293
    1294
    1295
    1296
    1297
    1298
    1299
    1300
    1301
    1302
    1303
    1304
    1305
    1306
    1307
    1308
    1309
    1310
    1311
    1312
    1313
    1314
    1315
    1316
    1317
    1318
    1319
    1320
    1321
    1322
    1323
    1324
    1325
    1326
    1327
    1328
    1329
    1330
    1331
    1332
    1333
    1334
    1335
    1336
    1337
    1338
    1339
    1340
    1341
    1342
    1343
    1344
    1345
    1346
    1347
    1348
    1349
    1350
    1351
    1352
    1353
    1354
    1355
    1356
    1357
    1358
    1359
    1360
    1361
    1362
    1363
    1364
    1365
    1366
    1367
    1368
    1369
    1370
    1371
    1372
    1373
    1374
    1375
    1376
    1377
    1378
    1379
    1380
    1381
    1382
    1383
    1384
    1385
    1386
    1387
    1388
    1389
    1390
    1391
    1392
    1393
    1394
    1395
    1396
    1397
    1398
    1399
    1400
    1401
    1402
    1403
    1404
    1405
    1406
    1407
    1408
    1409
    1410
    1411
    1412
    1413
    1414
    1415
    1416
    1417
    1418
    1419
    1420
    1421
    1422
    1423
    1424
    1425
    1426
    1427
    1428
    1429
    1430
    1431
    1432
    1433
    1434
    1435
    1436
    1437
    1438
    1439
    1440
    1441
    1442
    1443
    1444
    1445
    1446
    1447
    1448
    1449
    1450
    1451
    1452
    1453
    1454
    1455
    1456
    1457
    1458
    1459
    1460
    1461
    1462
    1463
    1464
    1465
    1466
    1467
    1468
    1469
    1470
    1471
    1472
    1473
    1474
    1475
    1476
    1477
    1478
    1479
    1480
    1481
    1482
    1483
    1484
    1485
    1486
    1487
    1488
    1489
    1490
    1491
    1492
    1493
    1494
    1495
    1496
    1497
    1498
    1499
    1500
    1501
    1502
    1503
    1504
    1505
    1506
    1507
    1508
    1509
    1510
    1511
    1512
    1513
    1514
    1515
    1516
    1517
    1518
    1519
    1520
    1521
    1522
    1523
    1524
    1525
    1526
    1527
    1528
    1529
    1530
    1531
    1532
    1533
    1534
    1535
    1536
    1537
    1538
    1539
    1540
    1541
    1542
    1543
    1544
    1545
    1546
    1547
    1548
    1549
    1550
    1551
    1552
    1553
    1554
    1555
    1556
    1557
    1558
    1559
    1560
    1561
    1562
    1563
    1564
    1565
    1566
    1567
    1568
    1569
    1570
    1571
    1572
    1573
    1574
    1575
    1576
    1577
    1578
    1579
    1580
    1581
    1582
    1583
    1584
    1585
    1586
    1587
    1588
    1589
    1590
    1591
    1592
    1593
    1594
    1595
    1596
    1597
    1598
    1599
    1600
    1601
    1602
    1603
    1604
    1605
    1606
    1607
    1608
    1609
    1610
    1611
    1612
    1613
    1614
    1615
    1616
    1617
    1618
    1619
    1620
    1621
    1622
    1623
    1624
    1625
    1626
    1627
    1628
    1629
    1630
    1631
    1632
    1633
    1634
    1635
    1636
    1637
    1638
    1639
    1640
    1641
    1642
    1643
    1644
    1645
    1646
    1647
    1648
    1649
    1650
    1651
    1652
    1653
    1654
    1655
    1656
    1657
    1658
    1659
    1660
    1661
    1662
    1663
    1664
    1665
    1666
    1667
    1668
    1669
    1670
    1671
    1672
    1673
    1674
    1675
    1676
    1677
     
    integer function test1()
    !  ELEMENTAL FUNCTION len_s(string) ! generic LEN
    !     type(VARYING_STRING),INTENT(IN) :: string 
    !     INTEGER                         :: len_s 
    !>>>
    USE ISO_VARYING_STRING
    type(VARYING_STRING) :: string
    string = "1234567890" 
    if(LEN(string).eq.10) then
       test1 = 0
    else
       test1 = 1
    endif
    end function test1
     
    integer function test2()
    ! ELEMENTAL FUNCTION c_to_s(chr) ! generic VAR_STR
    !     type(VARYING_STRING)        :: c_to_s 
    !     CHARACTER(LEN=*),INTENT(IN) :: chr 
    !     INTEGER                     :: lc 
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING)        :: s
         s =  "1234567890"
    if(VAR_STR("1234567890") .eq. s) then
       test2 = 0
    else
       test2 = 1
    endif
    end function test2
     
    integer function test3()
    !ELEMENTAL SUBROUTINE s_ass_s(var,expr) VARYING
    !     type(VARYING_STRING),INTENT(INOUT) :: var 
    !     type(VARYING_STRING),INTENT(IN)  :: expr 
    !>>>
    USE ISO_VARYING_STRING
    type(VARYING_STRING) :: var 
    type(VARYING_STRING) :: expr
    var = "abcdef" 
    expr = "12345" // var
    if(expr .eq. VAR_STR("12345abcdef")) then
       test3 = 0
    else
       test3 = 1
    endif
    end function test3
     
    integer function test4()
    !ELEMENTAL SUBROUTINE c_ass_s(var,expr) 
    !     CHARACTER(LEN=*),INTENT(OUT)    :: var 
    !     type(VARYING_STRING),INTENT(IN) :: expr 
    !     INTEGER                         :: lc,ls 
    !>>>
    USE ISO_VARYING_STRING
          CHARACTER(25)                   :: var 
          type(VARYING_STRING)            :: expr
          expr = "abcdef12345"
          var = expr 
    if(var .eq. "abcdef12345") then
       test4 = 0
    else
       test4 = 1
    endif
    end function test4
     
    integer function test5()
    !ELEMENTAL SUBROUTINE s_ass_c(var,expr)
    !     type(VARYING_STRING),INTENT(OUT) :: var 
    !     CHARACTER(LEN=*),INTENT(IN)      :: expr 
    !     INTEGER                          :: lc 
    !>>>
    USE ISO_VARYING_STRING
          type(VARYING_STRING) :: var 
          CHARACTER(25)        :: expr
          expr = "abcdef"
    	  var = expr 
    if(var .eq. "abcdef") then
       test5 = 0
    else
       test5 = 1
    endif
    end function test5
     
    integer function test6()
    ! ELEMENTAL FUNCTION s_concat_s(string_a,string_b)  ! string//string 
    !     type(VARYING_STRING),INTENT(IN) :: string_a,string_b 
    !     type(VARYING_STRING)            :: s_concat_s 
    !     INTEGER                         :: la,lb 
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING):: string_a,string_b,string_c
    	 string_a = "12345"
    	 string_b = "abcdef"
    	 string_c = string_a // string_b 
    if(string_c == VAR_STR("12345abcdef")) then
       test6 = 0
    else
       test6 = 1
    endif
    end function test6
     
    integer function test7()
    ! ELEMENTAL FUNCTION s_concat_c(string_a,string_b)  ! string//character
    !     type(VARYING_STRING),INTENT(IN) :: string_a 
    !     CHARACTER(LEN=*),INTENT(IN)     :: string_b 
    !     type(VARYING_STRING)            :: s_concat_c 
    !     INTEGER                         :: la,lb 
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING):: string_a,string_c
    	 character(6) string_b
    	 string_a = "12345"
    	 string_b = "abcdef"
    	 string_c = string_a // string_b 
    if(string_c == VAR_STR("12345abcdef")) then
       test7 = 0
    else
       test7 = 1
    endif
    end function test7
     
    integer function test8()
    ! ELEMENTAL FUNCTION c_concat_s(string_a,string_b)  ! character//string 
    !     CHARACTER(LEN=*),INTENT(IN)     :: string_a 
    !     type(VARYING_STRING),INTENT(IN) :: string_b 
    !     type(VARYING_STRING)            :: c_concat_s 
    !     INTEGER                         :: la,lb 
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: string_b,string_c
    	 character(5) string_a
    	 string_a = "12345"
    	 string_b = "abcdef"
    	 string_c = string_a // string_b 
    if(string_c == VAR_STR("12345abcdef")) then
       test8 = 0
    else
       test8 = 1
    endif
    end function test8
     
    integer function test9()
    !ELEMENTAL FUNCTION repeat_s(string,ncopies)                                     
    !    type(VARYING_STRING),INTENT(IN) :: string 
    !    INTEGER,INTENT(IN)              :: ncopies 
    !    type(VARYING_STRING)            :: repeat_s
    !    INTEGER                         :: lr,ls 
    !>>>
    USE ISO_VARYING_STRING
        type(VARYING_STRING) :: string_a, string_b
        INTEGER              :: ncopies = 5
    	string_b = "123"
    	string_a = repeat(string_b, ncopies)
    if(string_a == VAR_STR("123123123123123")) then
       test9 = 0
    else
       test9 = 1
    endif
    end function test9
     
    integer function test10()
    ! ELEMENTAL FUNCTION s_eq_s(string_a,string_b)  ! string==string 
    !     type(VARYING_STRING),INTENT(IN) :: string_a,string_b 
    !     LOGICAL                         :: s_eq_s 
    !     INTEGER                         :: la,lb 
    !>>>
    USE ISO_VARYING_STRING
        type(VARYING_STRING) :: string_a , string_b  
     string_a = "123"
     string_b = "123"
    if(string_a == string_b) then
       test10 = 0
    else
       test10 = 1
    endif
    end function test10
     
    integer function test11()
    ! ELEMENTAL FUNCTION s_eq_c(string_a,string_b)  ! string==character 
    !     type(VARYING_STRING),INTENT(IN) :: string_a 
    !     CHARACTER(LEN=*),INTENT(IN)     :: string_b 
    !     LOGICAL                         :: s_eq_c 
    !     INTEGER                         :: la,lb,ls
    !>>>
    USE ISO_VARYING_STRING
        type(VARYING_STRING) :: string_a
    	character(3) ::  string_b = "123" 
      string_a= "123"
    if(string_a == string_b) then
       test11 = 0
    else
       test11 = 1
    endif
    end function test11
     
    integer function test12()
    ! ELEMENTAL FUNCTION c_eq_s(string_a,string_b)  ! character==string 
    !     CHARACTER(LEN=*),INTENT(IN)     :: string_a 
    !     type(VARYING_STRING),INTENT(IN) :: string_b 
    !     LOGICAL                         :: c_eq_s 
    !     INTEGER                         :: la,lb,ls
    !>>>
    USE ISO_VARYING_STRING
        type(VARYING_STRING) :: string_b
    	character(3) ::  string_a = "123" 
    string_b = "123"
    if(string_a == string_b) then
       test12 = 0
    else
       test12 = 1
    endif
    end function test12
     
    integer function test13()
    ! ELEMENTAL FUNCTION s_ne_s(string_a,string_b)  ! string/=string 
    !     type(VARYING_STRING),INTENT(IN) :: string_a,string_b 
    !     LOGICAL                         :: s_ne_s 
    !     INTEGER                         :: la,lb 
    !>>>
    USE ISO_VARYING_STRING
        type(VARYING_STRING) :: string_a , string_b  
     string_a = "124"
     string_b = "123"
    if(string_a /= string_b) then
       test13 = 0
    else
       test13 = 1
    endif
    end function test13
     
    integer function test14()
    ! ELEMENTAL FUNCTION s_ne_c(string_a,string_b)  ! string/=character
    !     type(VARYING_STRING),INTENT(IN) :: string_a 
    !     CHARACTER(LEN=*),INTENT(IN)     :: string_b 
    !     LOGICAL                         :: s_ne_c 
    !     INTEGER                         :: la,lb,ls
    !>>>
    USE ISO_VARYING_STRING
        type(VARYING_STRING) :: string_a
    	character(3) ::  string_b = "123" 
    string_a = "124"
    if(string_a /= string_b) then
       test14 = 0
    else
       test14 = 1
    endif
    end function test14
     
    integer function test15()
    ! ELEMENTAL FUNCTION c_ne_s(string_a,string_b)  ! character/=string 
    !     CHARACTER(LEN=*),INTENT(IN)     :: string_a 
    !     type(VARYING_STRING),INTENT(IN) :: string_b 
    !     LOGICAL                         :: c_ne_s 
    !     INTEGER                         :: la,lb,ls
    !>>>
    USE ISO_VARYING_STRING
        type(VARYING_STRING) :: string_b
    	character(3) ::  string_a = "12A" 
    string_b = "123"
    if(string_a /= string_b) then
       test15 = 0
    else
       test15 = 1
    endif
    end function test15
     
    integer function test16()
    ! ELEMENTAL FUNCTION s_lt_s(string_a,string_b)  ! string<string
    !     type(VARYING_STRING),INTENT(IN) :: string_a,string_b 
    !     LOGICAL                         :: s_lt_s 
    !     INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
        type(VARYING_STRING) :: string_a , string_b  
     string_a = "123"
     string_b = "234"
    if(string_a < string_b) then
       test16 = 0
    else
       test16 = 1
    endif
    end function test16
     
    integer function test17()
    ! ELEMENTAL FUNCTION s_lt_c(string_a,string_b)  ! string<character 
    !     type(VARYING_STRING),INTENT(IN) :: string_a 
    !     CHARACTER(LEN=*),INTENT(IN)     :: string_b 
    !     LOGICAL                         :: s_lt_c 
    !     INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
        type(VARYING_STRING) :: string_a 
     character(3) :: string_b = "234"
     string_a = "123"
    if(string_a < string_b) then
       test17 = 0
    else
       test17 = 1
    endif
    end function test17
     
    integer function test18()
    ! ELEMENTAL FUNCTION c_lt_s(string_a,string_b)  ! character<string
    !     CHARACTER(LEN=*),INTENT(IN)     :: string_a 
    !     type(VARYING_STRING),INTENT(IN) :: string_b 
    !     LOGICAL                         :: c_lt_s 
    !     INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
        type(VARYING_STRING) :: string_b 
     character(3) :: string_a = "123"
     string_b = "124"
    if(string_a < string_b) then
       test18 = 0
    else
       test18 = 1
    endif
    end function test18
     
    integer function test19()
    ! ELEMENTAL FUNCTION s_le_s(string_a,string_b)  ! string<=string 
    !     type(VARYING_STRING),INTENT(IN) :: string_a,string_b 
    !     LOGICAL                         :: s_le_s 
    !     INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
        type(VARYING_STRING) :: string_a , string_b  
     string_a = "123"
     string_b = "123"
    if(string_a <= string_b) then
       test19 = 0
    else
       test19 = 1
    endif
    end function test19
     
    integer function test20()
    ! ELEMENTAL FUNCTION s_le_c(string_a,string_b)  ! string<=character
    !     type(VARYING_STRING),INTENT(IN) :: string_a 
    !     CHARACTER(LEN=*),INTENT(IN)     :: string_b 
    !     LOGICAL                         :: s_le_c 
    !     INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
        type(VARYING_STRING) :: string_a 
     character(3) :: string_b = "123"
     string_a = "123"
    if(string_a <= string_b) then
       test20 = 0
    else
       test20 = 1
    endif
    end function test20
     
    integer function test21()
    ! ELEMENTAL FUNCTION c_le_s(string_a,string_b)  ! character<=string 
    !     CHARACTER(LEN=*),INTENT(IN)     :: string_a 
    !     type(VARYING_STRING),INTENT(IN) :: string_b 
    !     LOGICAL                         :: c_le_s 
    !     INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
        type(VARYING_STRING) :: string_b 
     character(3) :: string_a = "123"
     string_b = "123"
    if(string_a <= string_b) then
       test21 = 0
    else
       test21 = 1
    endif
    end function test21
     
    integer function test22()
    ! ELEMENTAL FUNCTION s_ge_s(string_a,string_b)  ! string>=string
    !     type(VARYING_STRING),INTENT(IN) :: string_a,string_b 
    !     LOGICAL                         :: s_ge_s 
    !     INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
        type(VARYING_STRING) :: string_a , string_b  
     string_a = "123"
     string_b = "123"
    if(string_a >= string_b) then
       test22 = 0
    else
       test22 = 1
    endif
    end function test22
     
    integer function test23()
    ! ELEMENTAL FUNCTION s_ge_c(string_a,string_b)  ! string>=character 
    !     type(VARYING_STRING),INTENT(IN) :: string_a 
    !     CHARACTER(LEN=*),INTENT(IN)     :: string_b 
    !     LOGICAL                         :: s_ge_c 
    !     INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
        type(VARYING_STRING) :: string_a 
     character(3) :: string_b = "123"
     string_a = "123"
    if(string_a >= string_b) then
       test23 = 0
    else
       test23 = 1
    endif
    end function test23
     
    integer function test24()
    ! ELEMENTAL FUNCTION c_ge_s(string_a,string_b)  ! character>=string
    !     CHARACTER(LEN=*),INTENT(IN)     :: string_a 
    !     type(VARYING_STRING),INTENT(IN) :: string_b 
    !     LOGICAL                         :: c_ge_s 
    !     INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
        type(VARYING_STRING) :: string_b 
     character(3) :: string_a = "123"
     string_b = "123"
    if(string_a >= string_b) then
       test24 = 0
    else
       test24 = 1
    endif
    end function test24
     
    integer function test25()
    ! ELEMENTAL FUNCTION s_gt_s(string_a,string_b)  ! string>string 
    !     type(VARYING_STRING),INTENT(IN) :: string_a,string_b 
    !     LOGICAL                         :: s_gt_s 
    !     INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
    type(VARYING_STRING) :: string_a, string_b
     string_a = "124"
     string_b = "123"
    if(string_a > string_b) then
       test25 = 0
    else
       test25 = 1
    endif
    end function test25
     
    integer function test26()
    ! ELEMENTAL FUNCTION s_gt_c(string_a,string_b)  ! string>character
    !     type(VARYING_STRING),INTENT(IN) :: string_a 
    !     CHARACTER(LEN=*),INTENT(IN)     :: string_b 
    !     LOGICAL                         :: s_gt_c 
    !     INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
        type(VARYING_STRING) :: string_a 
     character(3) :: string_b = "123"
     string_a = "124"
    if(string_a > string_b) then
       test26 = 0
    else
       test26 = 1
    endif
    end function test26
     
    integer function test27()
    ! ELEMENTAL FUNCTION c_gt_s(string_a,string_b)  ! character>string 
    !     CHARACTER(LEN=*),INTENT(IN)     :: string_a 
    !     type(VARYING_STRING),INTENT(IN) :: string_b 
    !     LOGICAL                         :: c_gt_s 
    !     INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
        type(VARYING_STRING) :: string_b 
     character(3) :: string_a = "124"
     string_b = "123"
    if(string_a > string_b) then
       test27 = 0
    else
       test27 = 1
    endif
    end function test27
     
    integer function test28()
    !ELEMENTAL FUNCTION s_llt_s(string_a,string_b)  ! string_a<string_b ISO-646 ordering 
    !    type(VARYING_STRING),INTENT(IN) :: string_a,string_b 
    !    LOGICAL                         :: s_llt_s 
    !    INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
    type(VARYING_STRING) :: string_a, string_b
     string_a = "121"
     string_b = "123"
    if(LLT(string_a, string_b)) then
       test28 = 0
    else
       test28 = 1
    endif
    end function test28
     
    integer function test29()
    !ELEMENTAL FUNCTION s_llt_c(string_a,string_b)   ! string_a<string_b ISO-646 ordering 
    !    type(VARYING_STRING),INTENT(IN) :: string_a 
    !    CHARACTER(LEN=*),INTENT(IN)     :: string_b 
    !    LOGICAL                         :: s_llt_c 
    !    INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
    type(VARYING_STRING) :: string_a
    character(3) :: string_b = "123"
     string_a = "121"
    if(LLT(string_a, string_b)) then
       test29 = 0
    else
       test29 = 1
    endif
    end function test29
     
    integer function test30()
    !ELEMENTAL FUNCTION c_llt_s(string_a,string_b)  ! string_a,string_b ISO-646 ordering
    !    CHARACTER(LEN=*),INTENT(IN)     :: string_a
    !    type(VARYING_STRING),INTENT(IN) :: string_b
    !    LOGICAL                         :: c_llt_s
    !    INTEGER                         :: ls,la,lb
    !>>>
    USE ISO_VARYING_STRING
    type(VARYING_STRING) :: string_b
    character(3) :: string_a = "123"
     string_b = "124"
    if(LLT(string_a, string_b)) then
       test30 = 0
    else
       test30 = 1
    endif
    end function test30
     
    integer function test31()
    !ELEMENTAL FUNCTION s_lle_s(string_a,string_b)  ! string_a<=string_b ISO-646 ordering 
    !    type(VARYING_STRING),INTENT(IN) :: string_a,string_b 
    !    LOGICAL                         :: s_lle_s 
    !    INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
    type(VARYING_STRING) :: string_a, string_b
     string_a = "121"
     string_b = "123"
    if(LLE(string_a, string_b)) then
       test31 = 0
    else
       test31 = 1
    endif
    end function test31
     
    integer function test32()
    !ELEMENTAL FUNCTION s_lle_c(string_a,string_b)  ! strung_a<=string_b ISO-646 ordering
    !    type(VARYING_STRING),INTENT(IN) :: string_a 
    !    CHARACTER(LEN=*),INTENT(IN)     :: string_b 
    !    LOGICAL                         :: s_lle_c 
    !    INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
    type(VARYING_STRING) :: string_a
    character(3) :: string_b = "123"
     string_a = "121"
    if(LLE(string_a, string_b)) then
       test32 = 0
    else
       test32 = 1
    endif
    end function test32
     
    integer function test33()
    !ELEMENTAL FUNCTION c_lle_s(string_a,string_b)  ! string_a<=string_b ISO-646 ordering 
    !    CHARACTER(LEN=*),INTENT(IN)     :: string_a 
    !    type(VARYING_STRING),INTENT(IN) :: string_b 
    !    LOGICAL                         :: c_lle_s 
    !    INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
    type(VARYING_STRING) :: string_b
    character(3) :: string_a = "121"
     string_b = "123"
    if(LLT(string_a, string_b)) then
       test33 = 0
    else
       test33 = 1
    endif
    end function test33
     
    integer function test34()
    !ELEMENTAL FUNCTION s_lge_s(string_a,string_b)  ! string_a>=string_b ISO-646 ordering 
    !    type(VARYING_STRING),INTENT(IN) :: string_a,string_b 
    !    LOGICAL                         :: s_lge_s 
    !    INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
    type(VARYING_STRING) :: string_a, string_b
     string_a = "123"
     string_b = "123"
    if(LGE(string_a, string_b)) then
       test34 = 0
    else
       test34 = 1
    endif
    end function test34
     
    integer function test35()
    !ELEMENTAL FUNCTION s_lge_c(string_a,string_b)  ! string_a>=string_b ISO-646 ordering
    !    type(VARYING_STRING),INTENT(IN) :: string_a 
    !    CHARACTER(LEN=*),INTENT(IN)     :: string_b 
    !    LOGICAL                         :: s_lge_c 
    !    INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
    type(VARYING_STRING) :: string_a
     character(3) :: string_b = "123"
     string_a = "123"
    if(LGE(string_a, string_b)) then
       test35 = 0
    else
       test35 = 1
    endif
    end function test35
     
    integer function test36()
    !ELEMENTAL FUNCTION c_lge_s(string_a,string_b)  ! string_a>=string_b ISO-646 ordering 
    !    CHARACTER(LEN=*),INTENT(IN)     :: string_a 
    !    type(VARYING_STRING),INTENT(IN) :: string_b 
    !    LOGICAL                         :: c_lge_s 
    !    INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
    type(VARYING_STRING) :: string_b
     character(3) :: string_a = "123"
     string_b = "123"
    if(LGE(string_a, string_b)) then
       test36 = 0
    else
       test36 = 1
    endif
    end function test36
     
    integer function test37()
    !ELEMENTAL FUNCTION s_lgt_s(string_a,string_b)  ! string_a>string_b ISO-646 ordering 
    !    type(VARYING_STRING),INTENT(IN) :: string_a,string_b 
    !    LOGICAL                         :: s_lgt_s 
    !    INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
    type(VARYING_STRING) :: string_a, string_b
     string_a = "124"
     string_b = "123"
    if(LGT(string_a, string_b)) then
       test37 = 0
    else
       test37 = 1
    endif
    end function test37
     
    integer function test38()
    !ELEMENTAL FUNCTION s_lgt_c(string_a,string_b)  ! string_a>string_b ISO-646 ordering 
    !    type(VARYING_STRING),INTENT(IN) :: string_a 
    !    CHARACTER(LEN=*),INTENT(IN)     :: string_b 
    !    LOGICAL                         :: s_lgt_c 
    !    INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
    type(VARYING_STRING) :: string_a
     character(3) :: string_b = "123"
     string_a = "124"
    if(LGT(string_a, string_b)) then
       test38 = 0
    else
       test38 = 1
    endif
    end function test38
     
    integer function test39()
    !ELEMENTAL FUNCTION c_lgt_s(string_a,string_b)  ! string_a>string_b ISO-646 ordering
    !    CHARACTER(LEN=*),INTENT(IN)     :: string_a 
    !    type(VARYING_STRING),INTENT(IN) :: string_b 
    !    LOGICAL                         :: c_lgt_s 
    !    INTEGER                         :: ls,la,lb 
    !>>>
    USE ISO_VARYING_STRING
    type(VARYING_STRING) :: string_b
     character(3) :: string_a = "124"
     string_b = "123"
    if(LGT(string_a, string_b)) then
       test39 = 0
    else
       test39 = 1
    endif
    end function test39
     
    integer function test40()
    ! ELEMENTAL FUNCTION insert_ss(string,start,substring)
    !     type(VARYING_STRING)            :: insert_ss
    !     type(VARYING_STRING),INTENT(IN) :: string
    !     INTEGER,INTENT(IN)              :: start
    !     type(VARYING_STRING),INTENT(IN) :: substring
    !     CHARACTER,POINTER,DIMENSION(:) :: work 
    !     INTEGER                        :: ip,is,lsub,ls 
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: string, substring, res
    string = "12345678"
    substring = "abcd"
    res = INSERT(string, 4, substring)
    if(res == VAR_STR("123abcd45678")) then
       test40 = 0
    else
       test40 = 1
    endif
    end function test40
     
    integer function test41()
    ! ELEMENTAL FUNCTION insert_sc(string,start,substring)
    !     type(VARYING_STRING)            :: insert_sc
    !     type(VARYING_STRING),INTENT(IN) :: string
    !     INTEGER,INTENT(IN)              :: start
    !     CHARACTER(LEN=*),INTENT(IN) :: substring
    !     CHARACTER,POINTER,DIMENSION(:) :: work 
    !     INTEGER                        :: ip,is,lsub,ls 
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: string, res
         character(4) :: substring = "abcd"
    string = "12345678"
    res = INSERT(string, 4, substring)
    if(res == VAR_STR("123abcd45678")) then
       test41 = 0
    else
       test41 = 1
    endif
    end function test41
     
    integer function test42()
    ! ELEMENTAL FUNCTION insert_cs(string,start,substring)
    !     type(VARYING_STRING)            :: insert_cs
    !     CHARACTER(LEN=*),INTENT(IN)     :: string
    !     INTEGER,INTENT(IN)              :: start
    !     type(VARYING_STRING),INTENT(IN) :: substring
    !     CHARACTER,POINTER,DIMENSION(:) :: work 
    !     INTEGER                        :: ip,is,lsub,ls 
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: substring, res
         character(8) :: string = "12345678"
    substring = "abcd"
    res = INSERT(string, 4, substring)
    if(res == VAR_STR("123abcd45678")) then
       test42 = 0
    else
       test42 = 1
    endif
    end function test42
     
    integer function test43()
    ! ELEMENTAL FUNCTION insert_cc(string,start,substring)
    !     type(VARYING_STRING)        :: insert_cc
    !     CHARACTER(LEN=*),INTENT(IN) :: string
    !     INTEGER,INTENT(IN)          :: start
    !     CHARACTER(LEN=*),INTENT(IN) :: substring
    !     CHARACTER,POINTER,DIMENSION(:) :: work 
    !     INTEGER                        :: ip,is,lsub,ls 
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: res
    	 character(4) :: substring = "abcd"
         character(8) :: string = "12345678"
    res = INSERT(string, 4, substring)
    if(res == VAR_STR("123abcd45678")) then
       test43 = 0
    else
       test43 = 1
    endif
    end function test43
     
    integer function test44()
    ! ELEMENTAL FUNCTION replace_ss(string,start,substring)
    !    type(VARYING_STRING)            :: replace_ss
    !    type(VARYING_STRING),INTENT(IN) :: string
    !    INTEGER,INTENT(IN)              :: start
    !    type(VARYING_STRING),INTENT(IN) :: substring
    !    CHARACTER,POINTER,DIMENSION(:) :: work
    !    INTEGER                        :: ip,is,nw,lsub,ls
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: string, substring, res
    string = "12345678"
    substring = "abcd"
    res = REPLACE(string, 4, substring)
    if(res == VAR_STR("123abcd8")) then
       test44 = 0
    else
       test44 = 1
    endif
    end function test44
     
    integer function test45()
    ! ELEMENTAL FUNCTION replace_ss_sf(string,start,finish,substring)
    !    type(VARYING_STRING)            :: replace_ss_sf
    !    type(VARYING_STRING),INTENT(IN) :: string
    !    INTEGER,INTENT(IN)              :: start,finish
    !    type(VARYING_STRING),INTENT(IN) :: substring
    !    CHARACTER,POINTER,DIMENSION(:) :: work
    !    INTEGER                        :: ip,is,if,nw,lsub,ls
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: string, substring, res
    string = "12345678"
    substring = "abcd"
    res = REPLACE(string, 4, 5, substring)
    if(res == VAR_STR("123abcd678")) then
       test45 = 0
    else
       test45 = 1
    endif
    end function test45
     
    integer function test46()
    !ELEMENTAL FUNCTION replace_sc(string,start,substring)
    !    type(VARYING_STRING)            :: replace_sc
    !    type(VARYING_STRING),INTENT(IN) :: string
    !    INTEGER,INTENT(IN)              :: start
    !    CHARACTER(LEN=*),INTENT(IN)     :: substring
    !    CHARACTER,POINTER,DIMENSION(:) :: work
    !    INTEGER                        :: ip,is,nw,lsub,ls
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: string, res
    character(4) :: substring = "abcd"
    string = "12345678"
    res = REPLACE(string, 4, substring)
    if(res == VAR_STR("123abcd8")) then
       test46 = 0
    else
       test46 = 1
    endif
    end function test46
     
    integer function test47()
    !ELEMENTAL FUNCTION replace_sc_sf(string,start,finish,substring)
    !    type(VARYING_STRING)            :: replace_sc_sf
    !    type(VARYING_STRING),INTENT(IN) :: string
    !    INTEGER,INTENT(IN)              :: start,finish
    !    CHARACTER(LEN=*),INTENT(IN)     :: substring
    !    CHARACTER,POINTER,DIMENSION(:) :: work
    !    INTEGER                        :: ip,is,if,nw,lsub,ls
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: string, res
    character(4) :: substring = "abcd"
    string = "12345678"
    res = REPLACE(string, 4, 5, substring)
    if(res == VAR_STR("123abcd678")) then
       test47 = 0
    else
       test47 = 1
    endif
    end function test47
     
    integer function test48()
    !ELEMENTAL FUNCTION replace_cs(string,start,substring)
    !    type(VARYING_STRING)            :: replace_cs
    !    CHARACTER(LEN=*),INTENT(IN)     :: string
    !    INTEGER,INTENT(IN)              :: start
    !    type(VARYING_STRING),INTENT(IN) :: substring
    !    CHARACTER,POINTER,DIMENSION(:) :: work
    !    INTEGER                        :: ip,is,nw,lsub,ls
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: substring, res
    character(8) :: string = "12345678"
    substring = "abcd"
    res = REPLACE(string, 4, substring)
    if(res == VAR_STR("123abcd8")) then
       test48 = 0
    else
       test48 = 1
    endif
    end function test48
     
    integer function test49()
    !ELEMENTAL FUNCTION replace_cs_sf(string,start,finish,substring)
    !    type(VARYING_STRING)            :: replace_cs_sf
    !    CHARACTER(LEN=*),INTENT(IN)     :: string
    !    INTEGER,INTENT(IN)              :: start,finish
    !    type(VARYING_STRING),INTENT(IN) :: substring
    !    CHARACTER,POINTER,DIMENSION(:) :: work
    !    INTEGER                        :: ip,is,if,nw,lsub,ls
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: substring, res
    character(8) :: string = "12345678"
    substring = "abcd"
    res = REPLACE(string, 4, 5,  substring)
    if(res == VAR_STR("123abcd678")) then
       test49 = 0
    else
       test49 = 1
    endif
    end function test49
     
    integer function test50()
    !ELEMENTAL FUNCTION replace_cc(string,start,substring)
    !    type(VARYING_STRING)            :: replace_cc
    !    CHARACTER(LEN=*),INTENT(IN)     :: string
    !    INTEGER,INTENT(IN)              :: start
    !    CHARACTER(LEN=*),INTENT(IN)     :: substring
    !    CHARACTER,POINTER,DIMENSION(:) :: work
    !    INTEGER                        :: ip,is,nw,lsub,ls
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) ::  res
    character(8) :: string = "12345678"
    character(4) ::substring = "abcd"
    res = REPLACE(string, 4, substring)
    if(res == VAR_STR("123abcd8")) then
       test50 = 0
    else
       test50 = 1
    endif
    end function test50
     
    integer function test51()
    !ELEMENTAL FUNCTION replace_cc_sf(string,start,finish,substring)
    !    type(VARYING_STRING)            :: replace_cc_sf
    !    CHARACTER(LEN=*),INTENT(IN)     :: string
    !    INTEGER,INTENT(IN)              :: start,finish
    !    CHARACTER(LEN=*),INTENT(IN)     :: substring
    !    CHARACTER,POINTER,DIMENSION(:) :: work
    !    INTEGER                        :: ip,is,if,nw,lsub,ls
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) ::  res
    character(8) :: string = "12345678"
    character(4) ::substring = "abcd"
    res = REPLACE(string, 4, 5, substring)
    if(res == VAR_STR("123abcd678")) then
       test51 = 0
    else
       test51 = 1
    endif
    end function test51
     
    integer function test52()
    !ELEMENTAL FUNCTION replace_sss(string,target,substring,every,back)
    !    type(VARYING_STRING)            :: replace_sss
    !    type(VARYING_STRING),INTENT(IN) :: string,target,substring
    !    LOGICAL,INTENT(IN),OPTIONAL     :: every,back
    !    LOGICAL                        :: dir_switch, rep_search
    !    CHARACTER,DIMENSION(:),POINTER :: work,temp
    !    INTEGER                        :: ls,lt,lsub,ipos,ipow
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: string, target, substring, res
    string = "123A45A678"
    target = "A"
    substring = "abcd"
    res = REPLACE(string, target, substring, .TRUE., .FALSE.)
    if(res == VAR_STR("123abcd45abcd678")) then
       test52 = 0
    else
       test52 = 1
    endif
    end function test52
     
    integer function test53()
    !ELEMENTAL FUNCTION replace_ssc(string,target,substring,every,back)
    !    type(VARYING_STRING)            :: replace_ssc
    !    type(VARYING_STRING),INTENT(IN) :: string,target
    !    CHARACTER(LEN=*),INTENT(IN)     :: substring
    !    LOGICAL,INTENT(IN),OPTIONAL     :: every,back
    !    LOGICAL                        :: dir_switch, rep_search
    !    CHARACTER,DIMENSION(:),POINTER :: work,temp
    !    INTEGER                        :: ls,lt,lsub,ipos,ipow
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: string, target, res
    character(4) :: substring = "abcd"
    string = "123A45A678"
    target = "A"
    res = REPLACE(string, target, substring, .TRUE., .FALSE.)
    if(res == VAR_STR("123abcd45abcd678")) then
       test53 = 0
    else
       test53 = 1
    endif
    end function test53
     
    integer function test54()
    !ELEMENTAL FUNCTION replace_scs(string,target,substring,every,back)
    !    type(VARYING_STRING)            :: replace_scs
    !    type(VARYING_STRING),INTENT(IN) :: string,substring
    !    CHARACTER(LEN=*),INTENT(IN)     :: target
    !    LOGICAL,INTENT(IN),OPTIONAL     :: every,back
    !    LOGICAL                        :: dir_switch, rep_search
    !    CHARACTER,DIMENSION(:),POINTER :: work,temp,tget
    !    INTEGER                        :: ls,lt,lsub,ipos,ipow
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: string, substring, res
    character(1) :: target = "A"
     
    substring = "abcd"
    string = "123A45A678"
    res = REPLACE(string, target, substring, .TRUE., .FALSE.)
    if(res == VAR_STR("123abcd45abcd678")) then
       test54 = 0
    else
       test54 = 1
    endif
    end function test54
     
    integer function test55()
    !ELEMENTAL FUNCTION replace_scc(string,target,substring,every,back)
    !    type(VARYING_STRING)            :: replace_scc
    !    type(VARYING_STRING),INTENT(IN) :: string
    !    CHARACTER(LEN=*),INTENT(IN)     :: target,substring
    !    LOGICAL,INTENT(IN),OPTIONAL     :: every,back
    !    LOGICAL                        :: dir_switch, rep_search
    !    CHARACTER,DIMENSION(:),POINTER :: work,temp,tget
    !    INTEGER                        :: ls,lt,lsub,ipos,ipow
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: string, res
    character(1) :: target = "A"
    character(4) :: substring = "abcd"
    string = "123A45A678"
    res = REPLACE(string, target, substring, .TRUE., .FALSE.)
    if(res == VAR_STR("123abcd45abcd678")) then
       test55 = 0
    else
       test55 = 1
    endif
    end function test55
     
    integer function test56()
    !ELEMENTAL FUNCTION replace_css(string,target,substring,every,back)
    !    type(VARYING_STRING)            :: replace_css
    !    CHARACTER(LEN=*),INTENT(IN)     :: string
    !    type(VARYING_STRING),INTENT(IN) :: target,substring
    !    LOGICAL,INTENT(IN),OPTIONAL     :: every,back
    !    LOGICAL                        :: dir_switch, rep_search
    !    CHARACTER,DIMENSION(:),POINTER :: work,temp,str
    !    INTEGER                        :: ls,lt,lsub,ipos,ipow
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: target, substring, res
    character(10) :: string = "123A45A678"
    target = "A"
    substring = "abcd"
    res = REPLACE(string, target, substring, .TRUE., .FALSE.)
    if(res == VAR_STR("123abcd45abcd678")) then
       test56 = 0
    else
       test56 = 1
    endif
    end function test56
     
    integer function test57()
    !ELEMENTAL FUNCTION replace_csc(string,target,substring,every,back)
    !    type(VARYING_STRING)            :: replace_csc
    !    type(VARYING_STRING),INTENT(IN) :: target
    !    CHARACTER(LEN=*),INTENT(IN)     :: string,substring
    !    LOGICAL,INTENT(IN),OPTIONAL     :: every,back
    !    LOGICAL                        :: dir_switch, rep_search
    !    CHARACTER,DIMENSION(:),POINTER :: work,temp,str
    !    INTEGER                        :: ls,lt,lsub,ipos,ipow
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: target, res
    character(10) :: string = "123A45A678"
    character(4) :: substring = "abcd"
    target = "A"
    res = REPLACE(string, target, substring, .TRUE., .FALSE.)
    if(res == VAR_STR("123abcd45abcd678")) then
       test57 = 0
    else
       test57 = 1
    endif
    end function test57
     
    integer function test58()
    !ELEMENTAL FUNCTION replace_ccs(string,target,substring,every,back)
    !    type(VARYING_STRING)            :: replace_ccs
    !    type(VARYING_STRING),INTENT(IN) :: substring
    !    CHARACTER(LEN=*),INTENT(IN)     :: string,target
    !    LOGICAL,INTENT(IN),OPTIONAL     :: every,back
    !    LOGICAL                        :: dir_switch, rep_search
    !    CHARACTER,DIMENSION(:),POINTER :: work,temp
    !    INTEGER                        :: ls,lt,lsub,ipos,ipow
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: substring, res
    character(10) :: string = "123A45A678"
    character(1) :: target = "A"
    substring = "abcd"
    res = REPLACE(string, target, substring, .TRUE., .FALSE.)
    if(res == VAR_STR("123abcd45abcd678")) then
       test58 = 0
    else
       test58 = 1
    endif
    end function test58
     
    integer function test59()
    !ELEMENTAL FUNCTION replace_ccc(string,target,substring,every,back)
    !    type(VARYING_STRING)            :: replace_ccc
    !    CHARACTER(LEN=*),INTENT(IN)     :: string,target,substring
    !    LOGICAL,INTENT(IN),OPTIONAL     :: every,back
    !    LOGICAL                        :: dir_switch, rep_search
    !    CHARACTER,DIMENSION(:),POINTER :: work,temp
    !    INTEGER                        :: ls,lt,lsub,ipos,ipow
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: res
    character(10) :: string = "123A45A678"
    character(1) :: target = "A"
    character(4) :: substring = "abcd"
    res = REPLACE(string, target, substring, .TRUE., .FALSE.)
    if(res == VAR_STR("123abcd45abcd678")) then
       test59 = 0
    else
       test59 = 1
    endif
    end function test59
     
    integer function test60()
    !ELEMENTAL FUNCTION remove_s(string,start,finish)
    !    type(VARYING_STRING)            :: remove_s
    !    type(VARYING_STRING),INTENT(IN) :: string
    !    INTEGER,INTENT(IN),OPTIONAL     :: start
    !    INTEGER,INTENT(IN),OPTIONAL     :: finish
    !    CHARACTER,DIMENSION(:),POINTER :: arg_str
    !    INTEGER                        :: is,if,ls
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: string, res
    string = "12345678"
    res = REMOVE(string, 5, 7)
    if(res == VAR_STR("12348")) then
       test60 = 0
    else
       test60 = 1
    endif
    end function test60
     
    integer function test61()
    !ELEMENTAL FUNCTION remove_c(string,start,finish)
    !    type(VARYING_STRING)        :: remove_c
    !    CHARACTER(LEN=*),INTENT(IN) :: string
    !    INTEGER,INTENT(IN),OPTIONAL :: start
    !    INTEGER,INTENT(IN),OPTIONAL :: finish
    !    CHARACTER,DIMENSION(:),POINTER :: arg_str
    !    INTEGER                        :: is,if,ls
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) ::  res
    character(8) ::string = "12345678"
    res = REMOVE(string, 5, 7)
    if(res == VAR_STR("12348")) then
       test61 = 0
    else
       test61 = 1
    endif
    end function test61
     
    integer function test62()
    !ELEMENTAL FUNCTION extract_s(string,start,finish) 
    !     type(VARYING_STRING),INTENT(IN) :: string 
    !     INTEGER,INTENT(IN),OPTIONAL     :: start     
    !     INTEGER,INTENT(IN),OPTIONAL     :: finish     
    !     type(VARYING_STRING)            :: extract_s 
    !     INTEGER                         :: is,if 
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: string, res
    string = "12345678"
    res = EXTRACT(string, 5, 7)
    if(res == VAR_STR("567")) then
       test62 = 0
    else
       test62 = 1
    endif
    end function test62
     
    integer function test63()
    !ELEMENTAL FUNCTION extract_c(string,start,finish)
    !     CHARACTER(LEN=*),INTENT(IN) :: string 
    !     INTEGER,INTENT(IN),OPTIONAL :: start   
    !     INTEGER,INTENT(IN),OPTIONAL :: finish  
    !     type(VARYING_STRING)        :: extract_c 
    !     INTEGER                      :: is,if 
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: res
    character(8) :: string = "12345678"
    res = EXTRACT(string, 5, 7)
    if(res == VAR_STR("567")) then
       test63 = 0
    else
       test63 = 1
    endif
    end function test63
     
    integer function test64()
    !ELEMENTAL SUBROUTINE split_s(string,word,set,separator,back)
    !     type(VARYING_STRING),INTENT(INOUT)        :: string
    !     type(VARYING_STRING),INTENT(OUT)          :: word
    !     type(VARYING_STRING),INTENT(IN)           :: set
    !     type(VARYING_STRING),INTENT(OUT),OPTIONAL :: separator
    !     LOGICAL,INTENT(IN),OPTIONAL               :: back
    !     LOGICAL           :: dir_switch 
    !     INTEGER           :: ls,tpos
    !     CHARACTER,ALLOCATABLE :: wst(:) ! working copy of string
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: string, word, set, separator
    string = "123a45678"
    set = "ab"
    call SPLIT(string, word, set, separator, .FALSE.)
    if((word == VAR_STR("123"))       .and.   &
       (string ==VAR_STR("45678"))   .and.   &
       (separator == VAR_STR("a"))) then
         test64 = 0
    else
         test64 = 1
    endif
    end function test64
     
    integer function test65()
    !ELEMENTAL SUBROUTINE split_c(string,word,set,separator,back)
    !     type(VARYING_STRING),INTENT(INOUT)        :: string
    !     type(VARYING_STRING),INTENT(OUT)          :: word
    !     CHARACTER(LEN=*),INTENT(IN)               :: set
    !     type(VARYING_STRING),INTENT(OUT),OPTIONAL :: separator
    !     LOGICAL,INTENT(IN),OPTIONAL               :: back
    !     LOGICAL                    :: dir_switch 
    !     INTEGER                    :: ls,tpos,lset
    !     CHARACTER,ALLOCATABLE :: wst(:) ! working copy of string
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: string, word, separator
         character(2) :: set = "ab"
    string = "123a45678"
    call SPLIT(string, word, set, separator, .FALSE.)
    if((word == VAR_STR("123"))      .and.   &
       (string ==VAR_STR("45678"))   .and.   &
       (separator == VAR_STR("a"))) then
         test65 = 0
    else
         test65 = 1
    endif
    end function test65
     
    integer function test66()
    ! ELEMENTAL FUNCTION index_ss(string,substring,back) 
    !     type(VARYING_STRING),INTENT(IN) :: string,substring 
    !     LOGICAL,INTENT(IN),OPTIONAL     :: back 
    !     INTEGER                         :: index_ss 
    !     LOGICAL                         :: dir_switch 
    !     INTEGER                         :: ls,lsub 
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: string, substring
         integer res
    string =   "abcdefghijk"
    substring= "def" 
    res  = INDEX(string, substring, .FALSE.)
    if(res==4) then
       test66 = 0
    else
       test66 = 1
    endif
    end function test66
     
    integer function test67()
    ! ELEMENTAL FUNCTION index_sc(string,substring,back)
    !     type(VARYING_STRING),INTENT(IN) :: string 
    !     CHARACTER(LEN=*),INTENT(IN)     :: substring 
    !     LOGICAL,INTENT(IN),OPTIONAL     :: back 
    !     INTEGER                         :: index_sc 
    !     LOGICAL                         :: dir_switch,matched 
    !     INTEGER                         :: ls,lsub 
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: string
         integer res    
         character :: substring= "def" 
    string =   "abcdefghijk"
    res  = INDEX(string, substring, .FALSE.)
    if(res==4) then
       test67 = 0
    else
       test67 = 1
    endif
    end function test67
     
    integer function test68()
    ! ELEMENTAL FUNCTION index_cs(string,substring,back)
    !     CHARACTER(LEN=*),INTENT(IN)     :: string 
    !     type(VARYING_STRING),INTENT(IN) :: substring 
    !     LOGICAL,INTENT(IN),OPTIONAL     :: back 
    !     INTEGER                         :: index_cs 
    !     LOGICAL                         :: dir_switch,matched 
    !     INTEGER                         :: ls,lsub 
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: substring
         integer res
    character(10) :: string =   "abcdefghijk"
    substring= "def" 
    res  = INDEX(string, substring, .FALSE.)
    if(res==4) then
       test68 = 0
    else
       test68 = 1
    endif
    end function test68
     
    integer function test69()
    ! ELEMENTAL FUNCTION scan_ss(string,set,back) 
    !     type(VARYING_STRING),INTENT(IN) :: string,set 
    !     LOGICAL,INTENT(IN),OPTIONAL     :: back 
    !     INTEGER                         :: scan_ss 
    !     LOGICAL                         :: dir_switch 
    !     INTEGER                         :: ls 
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: string, set
         integer res
    string =   "abcdefghijk"
    set= "def" 
    res  = SCAN(string, set, .FALSE.)
    if(res==4) then
       test69 = 0
    else
       test69 = 1
    endif
    end function test69
     
    integer function test70()
    ! ELEMENTAL FUNCTION scan_sc(string,set,back)
    !     type(VARYING_STRING),INTENT(IN) :: string 
    !     CHARACTER(LEN=*),INTENT(IN)     :: set 
    !     LOGICAL,INTENT(IN),OPTIONAL     :: back 
    !     INTEGER                         :: scan_sc 
    !     LOGICAL                         :: dir_switch,matched 
    !     INTEGER                         :: ls 
    !>>>
    USE ISO_VARYING_STRING
         integer res    
         type(VARYING_STRING) :: string  
         character(3) :: set = "def" 
    string =   "abcdefghijk"
    res  = SCAN(string, set, .FALSE.)
    if(res==4) then
       test70 = 0
    else
       test70 = 1
    endif
    end function test70
     
    integer function test71()
    ! ELEMENTAL FUNCTION scan_cs(string,set,back)
    !     CHARACTER(LEN=*),INTENT(IN)     :: string 
    !     type(VARYING_STRING),INTENT(IN) :: set 
    !     LOGICAL,INTENT(IN),OPTIONAL     :: back 
    !     INTEGER                         :: scan_cs 
    !     LOGICAL                         :: dir_switch,matched 
    !     INTEGER                         :: ls 
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: set 
         integer res
         character(10) :: string =   "abcdefghijk"
    set = "def" 
    res  = SCAN(string, set, .FALSE.)
    if(res==4) then
       test71 = 0
    else
       test71 = 1
    endif
    end function test71
     
    integer function test72()
    ! ELEMENTAL FUNCTION verify_ss(string,set,back) 
    !     type(VARYING_STRING),INTENT(IN) :: string,set 
    !     LOGICAL,INTENT(IN),OPTIONAL     :: back 
    !     INTEGER                         :: verify_ss 
    !     LOGICAL                     :: dir_switch 
    !     INTEGER                     :: ls 
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: string, set
         integer res
    string =   "abcdefghijk"
    set= "abc" 
    res  = VERIFY(string, set, .FALSE.)
    if(res==4) then
       test72 = 0
    else
       test72 = 1
    endif
    end function test72
     
    integer function test73()
    ! ELEMENTAL FUNCTION verify_sc(string,set,back)
    !     type(VARYING_STRING),INTENT(IN) :: string 
    !     CHARACTER(LEN=*),INTENT(IN)     :: set 
    !     LOGICAL,INTENT(IN),OPTIONAL     :: back 
    !     INTEGER                         :: verify_sc 
    !     LOGICAL                     :: dir_switch
    !     INTEGER                     :: ls 
    !>>>
    USE ISO_VARYING_STRING
         integer res    
         type(VARYING_STRING) :: string  
         character(3) :: set = "abc" 
    string =   "abcdefghijk"
    res  = VERIFY(string, set, .FALSE.)
    if(res==4) then
       test73 = 0
    else
       test73 = 1
    endif
    end function test73
     
    integer function test74()
    ! ELEMENTAL FUNCTION verify_cs(string,set,back)
    !     CHARACTER(LEN=*),INTENT(IN)     :: string 
    !     type(VARYING_STRING),INTENT(IN) :: set 
    !     LOGICAL,INTENT(IN),OPTIONAL     :: back 
    !     INTEGER                         :: verify_cs 
    !     LOGICAL                     :: dir_switch
    !     INTEGER                     :: ls 
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: set 
         integer res
         character(10) :: string =   "abcdefghijk"
    set = "abc" 
    res  = VERIFY(string, set, .FALSE.)
    if(res==4) then
       test74 = 0
    else
       test74 = 1
    endif
    end function test74
     
    integer function test75()
    !ELEMENTAL FUNCTION len_trim_s(string) 
    !    type(VARYING_STRING),INTENT(IN) :: string 
    !    INTEGER                         :: len_trim_s 
    !    INTEGER                         :: ls 
    !>>>
    USE ISO_VARYING_STRING
         integer res
         type(VARYING_STRING) :: string
    string = "abc   "
    res = LEN_TRIM(string)	  
    if(res==3) then
       test75 = 0
    else
       test75 = 1
    endif
    end function test75
     
    integer function test76()
    !ELEMENTAL FUNCTION trim_s(string) 
    !    type(VARYING_STRING),INTENT(IN)  :: string 
    !    type(VARYING_STRING)             :: trim_s 
    !    INTEGER                      :: ls,pos 
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: string, res
    string = "abc   "
    res = TRIM(string)	  
    if((LEN(res)==3) .and. (res==VAR_STR("abc"))) then
       test76 = 0
    else
       test76 = 1
    endif
    end function test76
     
    integer function test77()
    !ELEMENTAL FUNCTION iachar_s(string) 
    !    type(VARYING_STRING),INTENT(IN) :: string 
    !    INTEGER                         :: iachar_s 
    !    iachar_s = IACHAR(CHAR(string)) 
    !   ENDFUNCTION iachar_s 
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: c
    c = "Y"
    if(IACHAR(c) == 89) then
       test77 = 0
    else
       test77 = 1
    endif
    end function test77
     
    integer function test78()
    !ELEMENTAL FUNCTION ichar_s(string) 
    !    type(VARYING_STRING),INTENT(IN) :: string 
    !    INTEGER                         :: ichar_s 
    !    ichar_s = ICHAR(CHAR(string)) 
    !   ENDFUNCTION ichar_s 
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: c
    c = "Y"
    if(ICHAR(c) == 89) then
       test78 = 0
    else
       test78 = 1
    endif
    end function test78
     
    integer function test79()
    !ELEMENTAL FUNCTION adjustl_s(string) 
    !    type(VARYING_STRING),INTENT(IN) :: string 
    !    type(VARYING_STRING)            :: adjustl_s 
    !    INTEGER                         :: ls,pos 
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: string, res
    string = "   abcdef"
    res = ADJUSTL(string)
    if(res == VAR_STR("abcdef   ")) then
       test79 = 0
    else
       test79 = 1
    endif
    end function test79
     
    integer function test80()
    !ELEMENTAL FUNCTION adjustr_s(string) 
    !    type(VARYING_STRING),INTENT(IN) :: string 
    !    type(VARYING_STRING)            :: adjustr_s 
    !    INTEGER                         :: ls,pos 
    !>>>
    USE ISO_VARYING_STRING
         type(VARYING_STRING) :: string, res
    string = "abcdef   "
    res = ADJUSTR(string)
    if(res == VAR_STR("   abcdef")) then
       test80 = 0
    else
       test80 = 1
    endif
    end function test80
     
    Program iso_var_unit_tests
     integer errors(80), i
      external test1, test2,test3,test4,test5
      external test6, test7,test8,test9,test10
      external test11, test12,test13,test14,test15
      external test16, test17,test18,test19,test20
      external test21, test22,test23,test24,test25
      external test26, test27,test28,test29,test30
      external test31, test32,test33,test34,test35
      external test36, test37,test38,test39,test40
      external test41, test42,test43,test44,test45
      external test46, test47,test48,test49,test50
      external test51, test52,test53,test54,test55
      external test56, test57,test58,test59,test60
      external test61, test62,test63,test64,test65
      external test66, test67,test68,test69,test70
      external test71, test72,test73,test74,test75
      external test76, test77,test78,test79,test80
     
      integer test1, test2,test3,test4,test5
      integer test6, test7,test8,test9,test10
      integer test11, test12,test13,test14,test15
      integer test16, test17,test18,test19,test20
      integer test21, test22,test23,test24,test25
      integer test26, test27,test28,test29,test30
      integer test31, test32,test33,test34,test35
      integer test36, test37,test38,test39,test40
      integer test41, test42,test43,test44,test45
      integer test46, test47,test48,test49,test50
      integer test51, test52,test53,test54,test55
      integer test56, test57,test58,test59,test60
      integer test61, test62,test63,test64,test65
      integer test66, test67,test68,test69,test70
      integer test71, test72,test73,test74,test75
      integer test76, test77,test78,test79,test80
     
      errors(1) = test1()
      errors(2) = test2()
      errors(3) = test3()
      errors(4) = test4()
      errors(5) = test5()
      errors(6) = test6()
      errors(7) = test7()
      errors(8) = test8()
      errors(9) = test9()
      errors(10) = test10()
      errors(11) = test11()
      errors(12) = test12()
      errors(13) = test13()
      errors(14) = test14()
      errors(15) = test15()
      errors(16) = test16()
      errors(17) = test17()
      errors(18) = test18()
      errors(19) = test19()
      errors(20) = test20()
      errors(21) = test21()
      errors(22) = test22()
      errors(23) = test23()
      errors(24) = test24()
      errors(25) = test25()
      errors(26) = test26()
      errors(27) = test27()
      errors(28) = test28()
      errors(29) = test29()
      errors(30) = test30()
      errors(31) = test31()
      errors(32) = test32()
      errors(33) = test33()
      errors(34) = test34()
      errors(35) = test35()
      errors(36) = test36()
      errors(37) = test37()
      errors(38) = test38()
      errors(39) = test39()
      errors(40) = test40()
      errors(41) = test41()
      errors(42) = test42()
      errors(43) = test43()
      errors(44) = test44()
      errors(45) = test45()
      errors(46) = test46()
      errors(47) = test47()
      errors(48) = test48()
      errors(49) = test49()
      errors(50) = test50()
      errors(51) = test51()
      errors(52) = test52()
      errors(53) = test53()
      errors(54) = test54()
      errors(55) = test55()
      errors(56) = test56()
      errors(57) = test57()
      errors(58) = test58()
      errors(59) = test59()
      errors(60) = test60()
      errors(61) = test61()
      errors(62) = test62()
      errors(63) = test63()
      errors(64) = test64()
      errors(65) = test65()
      errors(66) = test66()
      errors(67) = test67()
      errors(68) = test68()
      errors(69) = test69()
      errors(70) = test70()
      errors(71) = test71()
      errors(72) = test72()
      errors(73) = test73()
      errors(74) = test74()
      errors(75) = test75()
      errors(76) = test76()
      errors(77) = test77()
      errors(78) = test78()
      errors(79) = test79()
      errors(80) = test80()
      do i = 1,80
        if(errors(i) .eq. 0) then
          write(*,*) "PASS            TEST", i
        else
          write(*,*) "FAIL*********** TEST", i
        endif
      enddo   
    end Program iso_var_unit_tests
    Il dispose de fonctions utilitaires pour convertir en char( VAR_STR), ecriture fichier(PUT_LINE),lecture fichier(get_d_eor) entre autres et une panoplie d'autres.....
    Il suffit de declarer une variable du type -car c'est un type-comme suit :
    -type(VARYING_STRING) :: string
    bon code.....
    Bonjour MABROUKI,

    Merci pour ta réponse et de ton aide , je vais regarder ça de plus prés et l’essayer/l’intégrer dans mon code.

    LeSnul

Discussions similaires

  1. Chaine de caractere dynamique
    Par mansgueg dans le forum C++
    Réponses: 4
    Dernier message: 08/03/2011, 11h49
  2. Réponses: 4
    Dernier message: 13/03/2009, 18h20
  3. Conversion d'une chaine en majuscule dynamiquement
    Par berti dans le forum Général JavaScript
    Réponses: 1
    Dernier message: 06/03/2008, 12h32
  4. Taille d'une chaine de caracteres dynamique
    Par BernardT dans le forum C
    Réponses: 5
    Dernier message: 01/11/2007, 02h31
  5. [VB.Net 2.0/xsd] Comment passer une chaine de connexion dynamiquement ?
    Par graphicsxp dans le forum Accès aux données
    Réponses: 4
    Dernier message: 21/07/2006, 11h20

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