Go to Google Groups Home
Advanced Groups Search    Preferences    Groups Help 
Groups search result 2 for  
 Buy or Sell Micromass • Ulima Mass Spectrometer Used/Refurbished LC triple quad MS • www.ietltd.comSponsored Links 
 ChromSmart MD Software • Automatic HPLC method development & analysis for chiral & non-chiral • www.chromsmart.com
 Mass Spectrometer - MALDI • PerkinElmer's prOTOF MALDI O-TOF featuring an Orthogonal Design • www.o-tof.com
From: Tobias Kind (tk2002deja@amdis.net)
Subject: Re: Chemstation : string array problems
View: Complete Thread (5 articles)
Original Format
Newsgroups: sci.chem.analytical
Date: 2002-07-02 04:18:58 PST
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).
> 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.

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
   while i < size
      local b$
      join x,b$

sdim labels$,6


Name tk_sdim
!test for string array > 500
!run with 
!macro "tk_sdim.mac",go    

   local i,x
   size = 15000
   while i < size
      local b$
      b$ = "astalavista baby " + val$(i)
      join x,b$
      print "Array[",i-1,"] = "x[i]

   ! 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$

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

Some HP Chemstation infos:

Google Home - Advertise with Us - Business Solutions - Services & Tools - Jobs, Press, & Help

©2003 Google