|
|
|
|
| News & Download | Screenshots | Code Examples |

| [...notice, non of these code examples can
actually run, just syntax demonstrations] Local $ret, $pidl, $res = '' ;:::Functions <-- example of main node (contains ";:" at start as AutoIt uses ";" for comments) Local $ubi = DllStructCreate ("hwnd;ptr;ptr;ptr;int;ptr;ptr;int") ; structure BROWSEINFO Local $utl = DllStructCreate ("char[512]") ; Browse title Local $urs = DllStructCreate ("char[260]") ; Buffer for path (MAX_PATH size) Local $ulf = BitOR (BitShift(BitAnd ($flags,1),-9), _ ; 1: NOT show Create Folder Button BitShift(BitAnd ($flags,2),-5), _ ; 2: Use New Dialog Style BitShift(BitAnd ($flags,4),-2)) ; 4: Show Edit Control ;;;;Functions:Filling structures <-- example of sub node (contains ";;" as identifier) DllStructSetData ($utl, 1, $title) DllStructSetData ($ubi, 1, $hwnd) DllStructSetData ($ubi, 3, DllStructGetPtr($urs)) DllStructSetData ($ubi, 4, DllStructGetPtr($utl)) DllStructSetData ($ubi, 5, $ulf) [...] |
| [...notice, non of these
code examples can actually run, just syntax demonstrations] //;:main <-- example of main node (contains ";:"later in string as C++ uses "//" for comments) main(int argc, char *argv[]) { //;;main:globals <-- example of sub node (contains ";;" as identifier) __int64 SmallN; /*64-bit wide integer, see BORLAND HELP for more info*/ __int64 SmallNOriginal; __int64 BigN; __int64 PrimeC; __int64 Divisor; __int64 Counter = 0; //;;main:file pointers <-- example of sub node FILE *FileLog; /*open filepointer called FileLog*/ FileLog = fopen("log.txt", "w"); /*let FileLog point to "log.txt"*/ double Dif; time_t start,end; //;;main:start of running code <-- example of sub node if (argc != 3) /*argument count, the filename is 0 (0,1,2,etc..)*/ { printf("pRi v0.3b, an C implementation of the C++ program PrimeQuest. \n",0); printf("Input 2 numbers at commandline, prime range in between will be calculated\n",0); printf("Options (pRi -? xx xxx):\n",0); exit(0); |


