...
Bloc de code |
---|
/* ___ Déclarations _____________________________________________________________________
alpha( 50) elementDay
liste lst_days elementDay
alpha(1000) myDays
/* ___ Code _____________________________________________________________________________
myDays = 'Sunday;Monday;Tuesday;Wednesday;Thursday;Friday;Saturday'
scinder_chaine myDays ';' lst_days
/* la liste "lst_days" contiendra 7 éléments : 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' |
3 -
...
Remplacer une partie de chaine de caractères
Afin de remplacer une partie de chaine de caractères, il suffit d'utiliser l'instruction RECH_REMPLACER
...
In order to replace a substring in a string, you simply have to use the SCAN_REPLACE instruction :
Bloc de code |
---|
/* ___ DeclarationsDéclarations _____________________________________________________________________ alpha(1000) myDays alpha(1000) myDaysModified alpha( 56) mySearchString alpha( 78) myReplacementString /* ___ Code _____________________________________________________________________________ myDays = 'Sunday;Monday;Tuesday;Wednesday;Thursday;Friday;Saturday' mySearchString = ';' myReplacementString = ' , ' myDaysModified = *blank scanrech_replacereplacer myDays mySearchString myReplacementString myDaysModified /* thela stringchaine myDaysModified will containcontiendra 'Sunday , Monday , Tuesday , Wednesday , Thursday , Friday , Saturday' |
4 -
...
Ajouter un "retour chariot" dans une chaine de manière à avoir un retour à la ligne dans un champs d'un écran.
Afin d'ajouter un "retour" à une variable alphanumerique, il faudra créer une chaine alpha contenant le caractère
...
In order to add a "return" to an alphanumerical variable, you should create a "CR" (carriage return) + et le caractère "LF" (line feed) string and add it to your alphanumerical variable.
Bloc de code |
---|
/* ___ DeclarationsDéclarations _____________________________________________________________________ ALPHA( 1) wCR ALPHA( 1) wLF ALPHA( 2) wCRLF ALPHA(100) wText /* ___ Code _____________________________________________________________________________ wCR = &CHARCONVERSION_CONVERSIONCAR('0D') wLF = &CHARCONVERSION_CONVERSIONCAR('0A') wCRLF = wCR // wLF wText = 'Hello' /// wCRLF /// 'world' z_display = wText |
The multi-line property of the text object should be checked if you want to see the line returnLa propriété Multiligne de l'objet texte devra être cochée si vous voulez pouvoir voir le retour à l'écran).
...
Date, Time and Timestamp
...