Skip to content
Tcl Source Code Artifact [e00e4ff3ab]
Login

Artifact [e00e4ff3ab]

Artifact e00e4ff3ab726438cbf9aa3f41b51acc587ab25e:

Ticket change [e00e4ff3ab] - Ticket [219224ffffffffff|219224ffff] <i>expr and format comands should handle long long (int64)</i> status still Open with 5 other changes by hobbs on 2000-11-22 01:34:28.
D 2000-11-22T01:34:28
J icomment ANSI\sC\s(keyword\s*ANSI*)\shas\s64\sbit\sinteger\stypes\sas\sint64_t\sand\suint64_t,\sbut\sthey\saren't\ssupported\sby\sall\sANSI\scompilers\s-\sjust\sthose\sthat\swant\sto\sprovide\s64bit\sint\ssupport.\s\sWindows\shas\s__int64.\s\sWhere\sint64_t\sisn't\syet\ssupported,\syou\smight\stry\ssimulating\sit\swith\slong\slong.\s\sAn\sexample\sthat\sworks\son\sWindows,\sLinux\s(32-bit\sPIII)\sand\sSolaris\s(64-bit\sUltraSparc)\sis:\n<PRE>\n#ifdef\s_WIN32\n#define\sint64_t\s\s__int64\n#define\suint64_t\sunsigned\s__int64\n#else\n#include\s<sys/types.h>\n#endif\n\n#ifndef\sint64_t\n#define\sint64_t\slong\slong\n#define\suint64_t\sunsigned\slong\slong\n#endif\n\nmain()\n{\n\s\s\s\suint64_t\si\s=\s0;\n\s\s\s\sprintf("sizeof\sint64\s=\s%d\\n",\ssizeof(int64_t));\n}\n</PRE>\n\nYou\scan\simprove\son\sthat\sby\sactually\schecking\salong\sthe\sway\suntil\syou\sget\san\s8-byte\swide\sinteger\stype\sinstead\sof\smaking\sthe\sassumptions.\n
J login hobbs
J mimetype text/plain
J title expr\sand\sformat\scomands\sshould\shandle\slong\slong\s(int64)
J username hobbs
K 219224ffffffffffffffffffffffffffffffffff
U hobbs
Z 309938e80bb4fe33ee1530f046ae6aa5