Re: [fpc-pascal] Re: Why this evaluates on if wrong ? (GMP)

2007-10-30 Thread Andrea Mauri
/mailman/listinfo/fpc-pascal -- Andrea Mauri PhD student - Chemical Sciences Milano Chemometrics and QSAR Research Group Department of Environmental Sciences University of Milano-Bicocca P.zza della Scienza, 1 20126 Milano - Italy Tel: ++39 02 64482801 mailto:[EMAIL PROTECTED] http

Re: [fpc-pascal] splitting string into array

2007-07-10 Thread Andrea Mauri
I used this, check it. // Returns an array with the parts of str separated by separator function Split(const str: string; const separator: string): array of string; var i, n: integer; strline, strfield: string; begin n:= Occurs(str, separator); SetLength(Result, n + 1); i := 0; strline:=

Re: [fpc-pascal] splitting string into array

2007-07-10 Thread Andrea Mauri
occurs is: function Occurs(const str, separator: string): integer; var i, nSep: integer; begin nSep:= 0; for i:= 1 to Length(str) do if str[i] = separator then Inc(nSep); Result:= nSep; end; Andrea Mauri ha scritto: I used this, check it. // Returns an array with the parts of str