Groups search result 2 for |
|
|
|
no_spam_unvalid@pandora.be wrote in message news:<3D20E13A.50F535E1@pandora.be>...
> Hi,
>
> For developing Chemstation macros
> I use an office computer (Win 98) equipped with
> Enhanced Chemstation G1701 BA Version B.01.00.
> The lab computer, where the macros are eventually used,
> is a Win NT with Enhanced Chemstation B1701 CA Version C.00.00.
> (Writing from home, I now have some doubt about B1701 vs G1701,
> anyway, they ARE the B and C version)
>
> There is one macro that has run w/o problems for some time
> but now suddenly gave problems with 2 chromatograms
> in which more than 500 peaks are found.
> After counting the peaks, the macro assigns arrays for storing data
> with DIM statements (for numbers) or DIM + SDIM statements (for strings).
>
> There is no problem on the B version but the C version (Win NT) terminates
> with "A string array can have between 0 and 500 elements".
> I could not find anything on this restriction in the on-line documentation,
> and therefore I am still wondering why this is specific for the C version.
>
> I am now delving through old data to find >500-peak chromatograms
> and I find a few, but unfortunetaly I cannot trace back with which
> version (i.e. computer) they were handled (we live, we learn, I will
> implement that)
> Any reason why a change in the NT-environment could have provoked
> this restriction ? (memory ??)
>
> I fear I will have to redesign the macro (dumping the strings to a file,
> instead of collecting in memory) but this seems cumbersome
> and I would prefer to avoid it.
> (In short : data are collected in a non-linear mode, most of the
> data are retrieved from the TIC, and later, the gaps are filled
> by scanning through all possible SICs - performing this scan each time
> data are missing would be quite time-consuming).
>
> TIA
>
> Johan
Hallo Johan,
* DIM variable name, scalar1 [,scalar2]
A normal DIM-Array must contain 1 - 96k elements (or exact 98304)
This is defined in cpres.dll and cpres32.dll.
Example:
DIM myarray,98304
DIM bigarray, 313,313
---------------------------------------------
* SDIM variable name, scalar1
SDIM is defined in all "init macros" (i.e. top.mac)
It is not hardcoded!
!
! macro to dimension string arrays
!
Name sdim
parameter x byname foo, size default 2
local i
i=1
while i < size
local b$
join x,b$
i=i+1
endwhile
return
Example:
sdim labels$,6
---------------------------------------------
Name tk_sdim
!test for string array > 500
!run with
!macro "tk_sdim.mac",go
local i,x
i=1
size = 15000
while i < size
local b$
b$ = "astalavista baby " + val$(i)
join x,b$
i=i+1
print "Array[",i-1,"] = "x[i]
endwhile
! Array starts from zero
! proof content
print "Array[",0,"] = "x[1]
sleep 1
print "Array[",i-1,"] = "x[i]
sleep 1
print "Array x = ",x
sleep 1
b$ = x[i]
print b$
return
---------------------------------------------
Now if you want to proof if there are arrays
with more than 500 elements try tk_sdim.mac
Save the follwoing example to "tk_sdim.mac"
and execute it at the command line.
As you can see, you can store more than 500
elements. It is not a problem of the SDIM
definition....... Debug the macro
and have a look where it cracks up.
With kind regards
Tobias Kind
www.amdis.net
PS:
Some HP Chemstation infos:
http://www.amdis.net/external/external.html
©2003 Google