Download Pelles C here: http://www.pellesc.se
Quote from: John Z on March 08, 2026, 09:26:14 PM👍👍👍
Definitely! Thanks Timo.
Better output too -long int a = 65536;
long int b = 65535;//10
int c = 0;
---------output---------
result: true c = -65536
result: false c = 131071
result: false c = 1
Press any key to continue...
John Z
#include <stdio.h>
#include <stdckdint.h>
int main(void)
{
int a = 655350;
int b = 10;
short int c = 0;
bool result = true;
result = ckd_add(&c, a, b); //out of range of short. a and b are int, c is short int.
if (result == true)
{
puts("true");
}else{
puts("false");
}
printf("c = %d ", c);
return 0;
}
Quote from: TimoVJL on March 08, 2026, 03:10:42 PMhttps://cppreference.net/c/numeric/ckd_mul.htmlthank you for your reply, TimoVJL. I have read it. please try my test code.
#include <stdio.h>
#include <stdckdint.h>
int main(void)
{
int a = 655350;
int b = 10;
short int c = 0;
bool result = true;
result = ckd_add(&c, a, b); //out of range of short. a and b are int, c is short int.
if (result == true)
{
puts("true");
}else{
puts("false");
}
printf("c = %d ", c);
return 0;
}
#include <stdio.h>
#include <stdckdint.h>
char *ab[] = {"false", "true "};
int main(void)
{
long int a = 655350;
long int b = 655350;//10
int c = 0;
bool result;
result = ckd_mul(&c, a, b); // ckd_add(&c, a, b); ckd_sub(&c, a, b);
printf("result: %s c = %d\n", ab[result], c);
result = ckd_add(&c, a, b); // ckd_sub(&c, a, b);
printf("result: %s c = %d\n", ab[result], c);
result = ckd_sub(&c, a, b);
printf("result: %s c = %d\n", ab[result], c);
return 0;
}
#include <stdio.h>
#include <stdckdint.h>
int main(void)
{
long int a = 655350;
long int b = 655350;//10
int c = 0;
//int c = 0;
bool result = true;
result = ckd_mul(&c, a, b); // ckd_add(&c, a, b); ckd_sub(&c, a, b);
if (result == true) {
puts("true\n");
}else{
puts("false\n");
}
printf("c = %d\n", c);
result = ckd_add(&c, a, b); // ckd_sub(&c, a, b);
if (result == true) {
puts("true\n");
}else{
puts("false\n");
}
printf("c = %d\n", c);
result = ckd_sub(&c, a, b);
if (result == true) {
puts("true\n");
}else{
puts("false\n");
}
printf("c = %d\n", c);
return 0;
}Quote from: TimoVJL on March 04, 2026, 05:19:10 PMThose libraries needs a RAD environment too to survive.
Just think what happened to Borland RADs.
Small programs are easy to develop with basic Win32 GUI.

// Boolean type
#if (defined(__STDC__) && __STDC_VERSION__ >= 199901L) || (defined(_MSC_VER) && _MSC_VER >= 1800)
#include <stdbool.h>
#elif !defined(__cplusplus) && !defined(bool)
typedef enum bool { false = 0, true = !false } bool;
#define RL_BOOL_TYPE
#endif
Building main.obj.
C:\SDK\raylib-5.5\include\raylib.h(210): warning #2090: Missing enum tag.
C:\SDK\raylib-5.5\include\raylib.h(210): error #2002: Invalid combination of 'enum' and 'bool'.
C:\SDK\raylib-5.5\include\raylib.h(210): warning #2014: Empty declaration.
C:\SDK\raylib-5.5\include\raylib.h(210): error #2001: Syntax error: expected ';' but found '{'.
C:\SDK\raylib-5.5\include\raylib.h(210): error #2156: Unrecognized declaration.
C:\SDK\raylib-5.5\include\raylib.h(210): warning #2014: Empty declaration.
#pragma comment(lib, "raylibdll.lib")
extern void raylibProc(void);
#include <windows.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
raylibProc();
return 0;
}
#include "raylib.h"
void raylibProc(void)
{
SetTraceLogLevel(LOG_NONE);
InitWindow(800, 450, "raylib hello");
SetTargetFPS(60);
while (!WindowShouldClose())
{
BeginDrawing();
ClearBackground(RAYWHITE);
DrawText("Hello, raylib!", 190, 200, 40, BLACK);
EndDrawing();
}
CloseWindow();
}Page created in 0.062 seconds with 15 queries.