the the question is : How are these numbers generated? maybe there is a typing issue (integer) or a division issue (div by zero)?
as we all know - longint should hold aprox 2.1 billion > Hi > More information > The contents of the Array <>StartSampleArray are > > Interpreted > 88200 > 7959168 > 14775852 > 20392428 > 26655216 > 33432504 > 40425000 > 48037248 > 55659492 > 62072808 > > > Compliled > 88200 > 7959168 > 14775852 > 20392428 > 26655216 > -23833727 > -16841231 > -9228983 > -1606739 > 4806577 > > I seem to be getting an overflow situation when compiled, but I > should be well within the scope of a Longint Array > Is there a setting I'm missing somewhere? > > 4D v13.6 MAC > > thanks > -pm > > On Tue, Feb 14, 2017 at 9:45 PM, Chip Scheide > <[email protected]> wrote: >> not sure what you are doing.. >> 26655216 is more then 7400 hours >> >> If $Duration is negative then <>StartSampleArray{$i} is larger then the >> next array element value (<>StartSampleArray{$i+1}) >> >> Since 26655216 seconds is 7400 hours, or if the the value 26+ million >> is milliseconds is still over 7.4 hours; I suspect that there is a >> data/ data collection problem. >> >> >> On Tue, 14 Feb 2017 21:30:54 +0000, Peter Mew via 4D_Tech wrote: >>> Hi >>> This snippet of code is in a loop, of typically 10 to 20 items. >>> The Array <>StartsampleArray holds the start time, in samples, of the >>> tracks on a CD. >>> It all works fine interpreted, but when compiled, when >>> <>StartSampleArray{$i} exceeds around 26655216 or thereabouts $Duration >>> turns negative, and it all falls over >>> <>StartSampleArray is copied from a Process array earlier in the code, >>> which itself is declared as a longint array >>> >>> $start and $duration are part of a LEP call to Sox to split the >> individual >>> tracks from a complete CD >>> It looks so simple, but why wont it work compiled? >>> >>> Thanks for any guidance >>> -pm >>> >>> >>> >>> $Start:=String(<>StartSampleArray{$i})+"s" >>> If ($i<Size of array(<>StartSampleArray)) >>> $trackDur:=<>StartSampleArray{$i+1}-<>startSampleArray{$i} >>> $Duration:=String($trackDur)+"s" >>> Else >>> $lastTrackDur:=<>EndofFileSamples-<>StartSampleArray{$i} >>> $duration:=String($lastTrackDur)+"s" >>> End if >>> ********************************************************************** >>> 4D Internet Users Group (4D iNUG) >>> FAQ: http://lists.4d.com/faqnug.html >>> Archive: http://lists.4d.com/archives.html >>> Options: http://lists.4d.com/mailman/options/4d_tech >>> Unsub: mailto:[email protected] >>> ********************************************************************** >> --------------- >> Gas is for washing parts >> Alcohol is for drinkin' >> Nitromethane is for racing > ------------ Hell is other people Jean-Paul Sartre ********************************************************************** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: http://lists.4d.com/mailman/options/4d_tech Unsub: mailto:[email protected] **********************************************************************

