|
0 registered members (),
6,962
guests, and 2
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Variables
[Re: FBL]
#356597
02/02/11 21:45
02/02/11 21:45
|
Joined: Mar 2010
Posts: 75
YellowAfterlife
Junior Member
|
Junior Member
Joined: Mar 2010
Posts: 75
|
At first, if you are making a application (without many visual components), you could try using C (or precisely, C++) for it. As in LiteC, you can always do something silly enough, as create a small function to store unsigned long int in string#4 and convert it to standart var type when you need it. Maybe, more variable types could be inplemented in engine, but who knows, how hard are these to add in.
Unfortunately, I've not worked with 3dGS for a while now, but it was fun
|
|
|
Re: Variables
[Re: YellowAfterlife]
#356604
02/02/11 22:22
02/02/11 22:22
|
Joined: Oct 2007
Posts: 5,211 İstanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
|
#include <acknex.h>
#include "printf.h"
void main(){
unsigned int a = 0xFFFFFFFF;
printf("%u",a);
}
not good enough?
3333333333
|
|
|
Re: Variables
[Re: Quad]
#356611
02/02/11 22:44
02/02/11 22:44
|
Joined: Apr 2007
Posts: 3,751 Canada
WretchedSid
Expert
|
Expert
Joined: Apr 2007
Posts: 3,751
Canada
|
Quadraxas, go ahead, define UINT32_MAX and compare it to an UINT16_MAX, you will be surprised. @firo: I feel your pain mate
Shitlord by trade and passion. Graphics programmer at Laminar Research. I write blog posts at feresignum.com
|
|
|
Re: Variables
[Re: Quad]
#356614
02/02/11 22:52
02/02/11 22:52
|
Joined: Sep 2003
Posts: 9,859
FBL
OP
Senior Expert
|
OP
Senior Expert
Joined: Sep 2003
Posts: 9,859
|
Sorry for being rude now, but.... how about a nice cup of RTFM?  We are not allowed to decide whether a variable is unsigned or signed - the compiler does. The "unsigned" keyword is only discarded to make imported native C code still compile without abort. When speaking in hex terms everything is fine - but I do not always want to view hex.
Last edited by Firoball; 02/02/11 22:54.
|
|
|
Re: Variables
[Re: FBL]
#356621
02/02/11 23:07
02/02/11 23:07
|
Joined: Oct 2007
Posts: 5,211 İstanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
|
right, i suddenly remember i thought dumping a7 and switching to another engine because of that. i didn't switch.
3333333333
|
|
|
Re: Variables
[Re: SchokoKeks]
#356691
02/03/11 13:59
02/03/11 13:59
|
Joined: Oct 2007
Posts: 5,211 İstanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
|
< > opeators always assume that the variable is signed. The main source of the problem.
3333333333
|
|
|
Re: Variables
[Re: SchokoKeks]
#356754
02/03/11 18:40
02/03/11 18:40
|
Joined: Sep 2003
Posts: 9,859
FBL
OP
Senior Expert
|
OP
Senior Expert
Joined: Sep 2003
Posts: 9,859
|
WHAT?!? unsigned doesn't do anything? Is it the same for unsigned short??
Damn, I've based parts on my last project on that.. Oh well.. Now I hate vars too! This information is so well hidden in the manual (under updating from c-script to lite-c) you'd never find it on your own! I think short is always unsigned. Sounds logical, doesn't it? No? Oh... I feel with you... Typ Grösse Bereich Minimum Genauigkeit* var 4 bytes -1048577.999 to 1048576.999** 0.001 ~9 long, int 4 bytes -2147483648 to 2147483647 1 ~10 short 2 bytes 0 to 65536 1 ~4 char 1 byte 0 to 256 1 ~2 float 4 bytes -3.4·1038 bis 3.4·1038 1.2·10-38 ~6 double 8 bytes -1.8·10308 bis 1.8·10308 2.2·10-308 ~14
|
|
|
|