929 new features in WINDEV, WEBDEV and WINDEV Mobile 2024

This procedure increments file names by adding a digit to the end of the name. Here is how it works: - The “sPath” variable gets the file path using the fExtractPath function with the fDrive and fDirectory parameters. This allows you to get the drive and directory. - The “sExt” variable gets the file extension using the fExtractPath function with the fExtension parameter. - The “sFile” variable gets the file name using the fExtractPath function with the fFile parameter. - The “n” variable is an integer variable used to store the number to be incremented. - The “nPos” variable is an integer variable which is initialized with the length of the “sFile” variable. Next, the “WHILE” loop runs as long as “nPos” is greater than 0 and the character corresponding to “nPos” in the “sFile” variable is numeric. At each iteration, the “nPos” variable is decremented. Then, depending on the value of “nPos”, several cases are possible: - If “nPos” equals 0, the file name contains only numbers. In this case, the name is converted into a numerical value, incremented by 1, and assigned to the “sFile” variable. - If “nPos” is equal to the size of the “sFile” variable, this means that the file name contains no digits at the end. In this case, “1” is added to the end of the name, using the “+=” concatenation operator. - Finally, if none of the above is true, it means that the file name contains numbers at the end, but not only. In this case, the numeric value corresponding to the digits at the end of the name is retrieved using the Val function, it is incremented by 1, and is assigned to the “sFile” variable. Finally, the procedure returns the path, name and extension of the newly incremented file. AUTOMATICALLY-GENERATED WLANGUAGE CODE DESCRIPTION UNDERSTAND CODE AT A GLANCE 134 N e w f e a t u r e W D W B WM AI IN THE CODE EDITOR In version 2024, the code editor can generate a description of pro- cedures and sections of code. Simply click an icon to generate these descriptions. You can use ChatGPT within the editor for this purpose. Benefit of this new feature in version 2024 : Better workflow 136 N e w f e a t u r e W D W B WM AUTO-GENERATE AN EXPLANATION OF WLANGUAGE CODE We’ve all been there: Working on code written by another developer or maintaining very old code, and not understanding what the code does. Now, the code editor can show you a clear, concise explanation of the process using natural language. Simply select the code for which you want to get an explanation. Benefit of this new feature in version 2024 : Truly amazing help feature 137 N e w f e a t u r e W D W B WM AUTO-GENERATE THE DOCUMENTATION OF A PROCEDURE The Code Editor can be used to generate the pro- cedure header comment from existing procedure code: • description of each parameter • return value of the procedure • description of pro- cesses in the procedure. These comments are generated in standard or Doxygen format. These comments are also used by the code editor to provide assistance as you write the calling code. Benefit of this new feature in version 2024 : Self-generated comments 135 N e w f e a t u r e W D W B WM AUTO-GENERATE CHECK-IN COMMENTS IN THE SCM It is good practice to write a brief description of the changes made, when checking resources back into the SCM. The code editor in version 2024 can also generate this description for the developer. Benefit of this new feature in version 2024 : Automatic documentation Please note the developer must have an OpenAI account to use these services. Additional costs may apply based on usage. // ! // ! @brief This procedure determines a readable color according to // ! a given background color. // ! // ! The procedure calculates the luminance of the background color passed as parameter. // ! According to this luminance, the text color must have a low or high lightness. The // ! color returned retains the hue and saturation of the background color. // ! // ! @param BackgroundColor The background color from which to determine the readable color. // ! @return Readable color determined according to the background color. // ! PROCEDURE ReadableColor (LOCAL InitialColor is Color ) : Color // Calculate the lightness of the color passed as parameter rBrightness = 1 - ( 0.299 * InitialColor ..Red + 0 .587 * InitialColor ..Green + 0 .114 * InitialColor ..Blue)/ 255 31 N e w f e a t u r e s i n W I ND E V 2 0 2 4 WE B D E V 2 0 2 4 W I ND E V Mo b i l e 2 0 2 4

RkJQdWJsaXNoZXIy NDQ0OA==