Re: Using Arrays - math precision

2011-06-04 Thread Jerry J
On Jun 4, 2011, at 4:01 PM, Mark Wieder wrote: > Jerry- > > Saturday, June 4, 2011, 3:52:03 PM, you wrote: > >> LC uses IEEE double-precision binary floating point numbers for >> calculations. These are 64 bits: 52 for mantissa, 11 for exponent >> and 1 for sign. So exponent range won't be a pro

Re: Using Arrays - math precision

2011-06-04 Thread Mark Wieder
Jerry- Saturday, June 4, 2011, 3:52:03 PM, you wrote: > LC uses IEEE double-precision binary floating point numbers for > calculations. These are 64 bits: 52 for mantissa, 11 for exponent > and 1 for sign. So exponent range won't be a problem, neither will 6 > decimal places, as long as the numbe

Re: Using Arrays - math precision

2011-06-04 Thread Jerry J
On Jun 3, 2011, at 11:35 PM, Mark Wieder wrote: > Van- > > Friday, June 3, 2011, 9:38:47 PM, you wrote: > >> Many thanks to Mike and Mark for helping me get my array and >> datagrid issues resolved to date. > >> The latest issue is in calculations. I need to have calculations >> done in floati

Re: Using Arrays

2011-06-03 Thread Van Brollini
5:15 -0700 From: Mark Wieder To: How to use LiveCode Subject: Re: Using Arrays > Van- > > Friday, June 3, 2011, 9:38:47 PM, you wrote: > > > Many thanks to Mike and Mark for helping me get my array and > > datagrid issues resolved to date. > > > The latest issue

Re: Using Arrays

2011-06-03 Thread Mark Wieder
Van- Friday, June 3, 2011, 9:38:47 PM, you wrote: > Many thanks to Mike and Mark for helping me get my array and > datagrid issues resolved to date. > The latest issue is in calculations. I need to have calculations > done in floating numbers and then the array finishes calculating it > truncat

Re: Using Arrays

2011-06-03 Thread Van Brollini
Many thanks to Mike and Mark for helping me get my array and datagrid issues resolved to date. The latest issue is in calculations. I need to have calculations done in floating numbers and then the array finishes calculating it truncates at the 6th decimal. I need to go out to at least E-23.

Re: Using Arrays

2011-06-03 Thread Van Brollini
on mouseUp get the dgdata of group "DGTester" put it into tArray put the keys of tArray Repeat with x = 1 to 1249 put "3.76" into tArray[x]["usl_lcb"] end Repeat set the dgData of group "DGTester" to tArray end mouseUp putting a breakpoint at the end mouseUp shows that 3.76 was suc

Re: Using Arrays

2011-06-03 Thread Mike Bonner
Yep, what mark said. :) Sorry I wasn't as clear as I should have been. > > -- it's a two-dimensional array > -- in C++ it's called a hash > -- dgData[column][row] will access a single element > > put the dgData of group "YourGrid" into tArray > > put the keys of tArray -- this will give you the r

Re: Using Arrays

2011-06-03 Thread Mark Wieder
Van- Friday, June 3, 2011, 6:57:01 PM, you wrote: > If you then *put the keys of tArray[1]* you will see the > column keys, col1 and col2, so to get a specific cell is as you've been > trying to do with the dgtext tarray[1]["col1"] will get the data from row 1 > col 1. > I do not get this beh

Re: Using Arrays

2011-06-03 Thread Van Brollini
If you then *put the keys of tArray[1]* you will see the column keys, col1 and col2, so to get a specific cell is as you've been trying to do with the dgtext tarray[1]["col1"] will get the data from row 1 col 1. I do not get this behaviour. This only gives me the column keys, not column keys

Re: Using Arrays

2011-06-03 Thread Van Brollini
Start Original Message - Sent: Fri, 3 Jun 2011 19:41:06 -0600 From: Mike Bonner To: How to use LiveCode Subject: Re: Using Arrays > Forgot to mention, once you adjust the array you can then set the datagrid > to the new values by setting the dgdata of group "yourgrid" to tArr

Re: Using Arrays

2011-06-03 Thread Van Brollini
- Start Original Message - Sent: Fri, 3 Jun 2011 19:36:36 -0600 From: Mike Bonner To: How to use LiveCode Subject: Re: Using Arrays > dgtext isn't an array value, to do what you want you need to get the dgdata > > For example, if you have a simple table grid with 2 col

Re: Using Arrays

2011-06-03 Thread Mike Bonner
Forgot to mention, once you adjust the array you can then set the datagrid to the new values by setting the dgdata of group "yourgrid" to tArray. Depending on what you're doing, it may be more efficient to just update values directly in the datagrid. Here are some base links to datagrid lessons t

Re: Using Arrays

2011-06-03 Thread Mike Bonner
dgtext isn't an array value, to do what you want you need to get the dgdata For example, if you have a simple table grid with 2 columns, col1 and col2 with 3 records, to get the array back out do *get the dgdata of group "yourdatagridgroupname" * *put it into tArray* At this point, knowing whats

Using Arrays

2011-06-03 Thread Van Brollini
I have a datagrid of 1250 by 28 that has been successfully uploaded during the creation of the datagrid. I can use this line put the dgText of group "DGTester" into tArray to move the datagrid into an array. During debug process with breakpoint, this is successful. Now when I try to read, modi