This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eC Coding Style Conventions | |
February 13, 2017 -- Draft version 0.3 | |
========================================= | |
Identifiers Naming | |
------------------ | |
- camelCase is used throughout for types and identifiers | |
- Types (classes/structs, enums...) start with an UpperCase | |
- Identifiers (global, local, member variables; functions, methods, enumeration values) start with a lowerCase | |
- Exception: Previously, Functions/Methods used to start with an UpperCase. | |
This was inconsistent and caused various issues, so new convention is lowerCase. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.ecere.hello; | |
public class hello extends android.app.NativeActivity | |
{ | |
static | |
{ | |
System.loadLibrary("ecere"); | |
System.loadLibrary("hello"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct MyStruct { int x, y; }; | |
class OtherClass { }; | |
class MyClass | |
{ | |
MyStruct myStructMember { }; | |
OtherClass myClassMember { }; | |
int a, b; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool figurePosition(int x, int y, Point pos) | |
{ | |
OldList list {}; | |
display.StartSelection(x,y, 0,0); | |
display.SetCamera(null, camera); | |
display.CollectHits(); | |
display.IntersectPolygons(); | |
pos = { -1, -1 }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public define Phi = 1.6180339887; | |
bool IsPerfectSquare(uint64 number) | |
{ | |
double root = sqrt(number); | |
uint64 square = (uint64)root * (uint64)root; | |
return square == number; | |
} | |
struct Matrix2x2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "ecere" | |
class Form : Window | |
{ | |
Form() | |
{ | |
printf("Form()\n"); | |
} | |
caption = $"Form1"; | |
background = formColor; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define MODULE_NAME "HelloForm" | |
// #define __CONSOLE_APP__ | |
#include "ecere.hpp" | |
class HelloForm : public Window | |
{ | |
public: | |
Label label; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ecere/src/sys/JSON.ec b/ecere/src/sys/JSON.ec | |
index cc793b7..9d63b68 100644 | |
--- a/ecere/src/sys/JSON.ec | |
+++ b/ecere/src/sys/JSON.ec | |
@@ -702,24 +702,13 @@ private: | |
bool isKey = false; | |
bool isTemplateArg = false; | |
uint offset = 0; | |
- if(eCON) | |
+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Program received signal SIGSEGV, Segmentation fault. | |
0x000000006bdc79ea in __ecereMethod___ecereNameSpace__ecere__com__Array_Free (this=0x0) at src/com/containers/Array.ec:375 | |
375 for(c = 0; c<count; c++) | |
(gdb) list | |
370 } | |
371 | |
372 void Free() | |
373 { | |
374 int c; | |
375 for(c = 0; c<count; c++) |