Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Storing a large negative number in a Property
Message
 
To
09/03/2006 13:16:21
Irv Adams
MSC Managed Care, Inc.
Florida, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01102817
Message ID:
01102847
Views:
19
>>>Marc:
>>>
>>>That's a simple and excellent idea. Do you know what the upper/lower integer limits are for a property, specifically?
>>>
>>>Irv.
>>>
>>>On storage, you can divide your values by a factor and multiply them by the same factor when using.
>>
>>From help:
>>Integer
>> Numeric value with no decimals
>>
>>For example, a line number in an order.
>> 4 bytes
>>
>>-2147483647 to 2147483647
>
>Borislav,
>
>Thanks, but here's a curiosity:
>Try storing 6872104804600 to a property, and fine, it will retain it. This is much larger than the 4 byte limit. Then try -2147090432, which is within the bounds of 4 bytes, and you get asterisks.
>
>Any ideas?
>
>Irv.


Where you see asteriks?
oForm = CREATEOBJECT([MyForm])
oForm.Show(1)


DEFINE CLASS MyForm AS form


	DoCreate = .T.
	Caption = "Form"
	test = .F.
	Name = "Aladinform1"


	ADD OBJECT command1 AS commandbutton WITH ;
		Top = 39, ;
		Left = 280, ;
		Height = 27, ;
		Width = 84, ;
		Caption = "Press me", ;
		Name = "Command1"


	PROCEDURE command1.Click
		DO CASE
		   CASE VARTYPE(thisform.Test) # [N]
		        thisform.test = 6872104804600

		   CASE thisform.Test = 6872104804600
		        thisform.test = -2147090432
		ENDCASE
	ENDPROC


ENDDEFINE
*
*-- EndDefine: aladinform1
**************************************************
BTW that limitation is for Fields.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform