-
-
Notifications
You must be signed in to change notification settings - Fork 267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature - support language Clipper #484
Comments
|
|
Clipper Language syntax: |
example of /*
This program demonstrates the calculation
of the factorial of a number using a function.
*/
FUNCTION Factorial( n )
LOCAL result := 1
LOCAL i
// Loop from 1 to n
FOR i := 1 TO n
result := result * i
NEXT
RETURN result
// Main program execution starts here
FUNCTION Main()
LOCAL num := 5
LOCAL fact
// Calculate the factorial of the number
fact := Factorial( num )
// Check if the factorial is greater than 100
IF fact > 100
? "Factorial is greater than 100"
ELSE
? "Factorial is less than or equal to 100"
ENDIF
RETURN |
I am wodering if we should split it to Clipper and Clipper Header ? Exmple of header file: /*
Constants and macro definitions for the program
*/
// Define a constant for the number to calculate factorial
#define NUM_TO_FACTORIAL 5
// Define messages to display
#define MSG_FACT_GT_100 "Factorial is greater than 100"
#define MSG_FACT_LE_100 "Factorial is less than or equal to 100"
// Define a macro for maximum factorial limit
#define MAX_FACT_LIMIT 100
// Prototype for the Factorial function
FUNCTION Factorial( n )
RETURN NIL
// Prototype for the Main function
FUNCTION Main()
RETURN NIL |
What is purpose of keywords? If its important we can use:
|
Sorry this came in on the weekend hence the late response. I have merged your PR in, but the support for header files and clipper files is probably best answered by you. I am not familiar with the language at all. As for the keywords, thats used in case there is clash on the filename extension. An example being verilog, coq and v which all use .v If the extension is unique there is no need to supply it. |
@boyter Do you have plans for release 3.3.5 version ? I can't wait to test it 😀🔥 |
I may release it before I go on break. I have most of a performance regression in place. Id like to solve it all, but perhaps it can wait. |
Ah screw it. Done. Enjoy the new release. |
Would it be hard to add support for this lang?
https://harbour.github.io/
The text was updated successfully, but these errors were encountered: