type conversions 
Author Message
 type conversions

I am programming Pascal on Unix.

I want to append an integer to a variable of type 'text' so that I can read
a number of files indexed by a number....

Is this possible ? If so how ?




Mon, 28 Feb 2000 03:00:00 GMT  
 type conversions

Quote:

> I am programming Pascal on Unix.

> I want to append an integer to a variable of type 'text' so that I can read
> a number of files indexed by a number....

> Is this possible ? If so how ?



You need to convert the integer to string and append it to your filename
string before openning the file.

--

Rob.


Please:
NO SPAM
NO JUNK E-MAIL
or I will have to do something annoying.



Tue, 29 Feb 2000 03:00:00 GMT  
 type conversions


Quote:
>I want to append an integer to a variable of type 'text' so that I can
>read
>a number of files indexed by a number....
>Is this possible ? If so how ?

Use IntToStr().

Cheers!
Michael "Ekorren" Kjorling



Fri, 03 Mar 2000 03:00:00 GMT  
 type conversions



ine.idg.se> writes

Quote:

>>I want to append an integer to a variable of type 'text' so that I can
>>read
>>a number of files indexed by a number....

>Use IntToStr().

And if you haven't got the TurboPower units you can use the str
procedure to convert an integer to a string as follows :

Function IntegerToString(Number:longint):string;
var Temp : string;                      
begin                          
    Str(Number,temp);                   {Note, no error checking}
    IntegerToString := temp;
end;

The above function will convert everything from byte to longint to a
string and return it as a function result which you can add to your
"text" string to generate your file names.

HTH

--

In principle,   is there uncertainty that
Heisenberg was working his best in chaos?



Sun, 05 Mar 2000 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Invalid variant type conversion

2. Invalid variant type conversion

3. type conversion/casting question

4. HELP!:Invalid Variant Type Conversion

5. Invalid Variant Type Conversion?

6. Implicit type conversion question

7. Type conversion?

8. Type conversion?

9. Help - Type Conversions

10. Invalid Variant Type Conversion ???

11. Type Conversions

12. ADO Insert causes Invalid Variant Type Conversion error

 

 
Powered by phpBB® Forum Software