At 23:18 29/04/2004 +0200, Miguel wrote:

>> Q: If you have an atomArray with the various attributes as multi-token
>> strings, should it be an error if all of the strings are not the same
>> length?
>
> Not sure... but I think so.

I think so too.

The current code is resizing the atomArray if (tokenCount > atomCount)

I think this is a mistake ... it should say something like
  if (atomCount == 0)
    allocate-the-atoms(tokenCount);
  else if (tokenCount != atomCount)
    throw-an-exception

This is exactly how I have implemented the SAXReader in openBabel. It is impossible to guarantee values if some of the array elements are missing.


Note that if you wish to hold whitespace (including empty strings) you can choose other delimiters. In normal cases this is unimportant but it is, in principle, possible to say:

<atomArray delimiter="/" title="/ CA/CA/"/> which distinguishes between Calpha and calcium. But I would try to avoid it!!

P.



Miguel



-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
Jmol-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Peter Murray-Rust Unilever Centre for Molecular Informatics Chemistry Department, Cambridge University Lensfield Road, CAMBRIDGE, CB2 1EW, UK Tel: +44-1223-763069



-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
Jmol-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to