****************************************************************************************** * **EndUser4gl : Utilitaire de tri ** ******************************************************************************************* ** ** Tri par odre alph #include "c:\EndUser4gl\4gl\hlp\IncludeSysEU\includesyseu.h" integer : exit_trans1 ,x; struct : ref { char Name: 25 , Surname:15 , Adresse:40 , Town:30 , Telephon:12, Fax:12, Country:20 ; long CodeTown ; } Sortinput "c:\EndUser4gl\4gl\hlp\datafile\adresse1.wri" length=158 /* fichier longueur variable= fichier texte*/ by ref.name Sortoutput "c:\EndUser4gl\4gl\hlp\datafile\AdresseSort.xls" Format(ref.name," ",ref.surname," ",ref.adresse," ", ref.town," ",ref.telephon," ",ref.fax," ", ref.country," ") use return_carriage ; display"OKK Sort...."; MsgBox : TITLE "My First SysCommandWindows" Message : " Sort is Finish see you -> c:\EndUser4gl\4gl\hlp\datafile\AdresseSort.xls" button : MB_OK icon : MB_ICONEXCLAMATION returning (x) ; SysCommandWindows("c:\Program Files\msoffice\excel\excel.exe c:\EndUser4gl\4gl\hlp\datafile\AdresseSort.xls" ) returning (x); case_of x when 0 : display "System was out of memory, executable file was corrupt, or relocations were invalid. ";end_when; when 2 : display "File was not found."; end_when; when 3 : display "Path was not found."; end_when; when 5 : display "Attempt was made to dynamically link to a task, or there was a sharing or network-protection error."; end_when; when 6 : display "Library required separate data segments for each task. ";end_when; when 8 : display "There was insufficient memory to start the application."; end_when; when 10 : display "Windows version was incorrect."; end_when; when 11 : display "Executable file was invalid. Either it was not a Windows application or there was an error in the .EXE image. ";end_when; when 12 : display "Application was designed for a different operating system. ";end_when; when 13 : display "Application was designed for MS-DOS 4.0. ";end_when; when 14 : display "Type of executable file was unknown. ";end_when; when 15 : display "Attempt was made to load a real-mode application (developed for an earlier version of Windows). ";end_when; when 16 : display "Attempt was made to load a second instance of an executable file containing multiple data segments that were not marked read-only."; end_when; when 19 : display "Attempt was made to load a compressed executable file. The file must be decompressed before it can be loaded."; end_when; when 20 : display "Dynamic-link library DLL file was invalid. One of the DLLs required to run this application was corrupt. ";end_when; when 21 : display "Application requires Microsoft Windows 32-bit extensions. ";end_when; end_case ;