John Coppens wrote:
On Fri, 08 Jul 2005 16:39:05 +0200
Thomas Zastrow <[EMAIL PROTECTED]> wrote:
Hello,
I'm converting some strings with "strtoint" into integers. But
sometimes the string can't be converted to a number. Is there a
function which takes a string and tells me if it is possibl
Thomas Zastrow wrote:
John Coppens wrote:
On Fri, 08 Jul 2005 16:39:05 +0200
Thomas Zastrow <[EMAIL PROTECTED]> wrote:
Hello,
I'm converting some strings with "strtoint" into integers. But
sometimes the string can't be converted to a number. Is there a
function which takes a string and t
> >You can use val(str, int/real, err)
> >
> >if err is 0, the string was converted to an integer or real (depending on
> >the type of int/real.
> >
> >John
>
> Thank you, it's working!!!
>
Yes that's the old Pascal version of StrToInt :) and it had errorchecking :)
Just for the record, like every
El Viernes, 8 de Julio de 2005 19:39, John Coppens escribió:
>
> You can use val(str, int/real, err)
If I remeber correctly, the point is hardcoded in Val as decimal separator. A
problem for countries in which we use different conventions.
--
saludos,
Nico Aragón
_
|
| Or if you wanted to prepend exceptions rather than catch them, the following
| function could also work have worked (note you have to do a shortString cast,
| AnsiStrings don't like access by character)
|
I was under the same impression for a long time, but some of the FPC RTL sources
use ansi
When a function requires that more than one value must be returned, what are the
advantages of returning one of these values in a paramater versus using a record
that contains all the data?
Example:
A function needs to return an integer, string, and boolean. Why not just return
a record containin
L505 wrote:
When a function requires that more than one value must be returned, what are the
advantages of returning one of these values in a paramater versus using a record
that contains all the data?
Example:
A function needs to return an integer, string, and boolean. Why not just return
a r
| possible to improve.. but I'm not so sure if it can. It's real high priority
| though, since most people know you can return a value as a parameter.
Not real high priority, is what I meant to say.
___
fpc-pascal maillist - fpc-pascal@lists.freepa
| procedure my_procedure(var a_record: t_my_record);
|
| In this case, a simple pointer is passed to my_procedure. This is also
| the way most C libraries work, passing a pointer to a structure.
Would a C program be able to call a Pascal SO or DLL file and directly read a
record from pascal, as a
L505 wrote:
| procedure my_procedure(var a_record: t_my_record);
|
| In this case, a simple pointer is passed to my_procedure. This is also
| the way most C libraries work, passing a pointer to a structure.
Would a C program be able to call a Pascal SO or DLL file and directly read a
record fro
| No. Even no performance loss. The "additional pointer" is the same as
| the otherwise used "var parameter". The following two pascal procedure
| do essentially the same, they just differ in syntax:
|
| function proc_1: t_record;
| begin
| result.a := 1;
| end;
|
| procedure proc_2(var x: t_reco
Anyone know what Jason Sage's current working email address is? His Hotmail
appears to be down. I wanted to check the sage API and his files. If he doesn't'
have FTP access I can upload his files to z505 ftp.
Also, if anyone else has files that have gone dead, let me know, send, and I'll
put em up
12 matches
Mail list logo