?? long strings? 
Author Message
 ?? long strings?

I have a character string variable which is 409 characters in length. I
want to ?? it to a file, but when I do it insists on putting a CR/LF in the
middle of it. This is because I have set MEMOWIDTH to 256 (the maximum
possible) so it prints it with a CR/LF after each 256 characters. Is there
any way I can do a ?? of the whole string without any breaks? My viewing
program that I use later has it's own wor-wrap facility so I don't want
FoxPro making arbitrary breaks in the middle.

Dave
--
-------------------------------------------------------------------------


|                          |  Fax                  - 60-3-2612870       |
|  Kuala Lumpur, Malaysia  |  Compuserve ID        - 70461,2360         |
-------------------------------------------------------------------------



Thu, 09 Oct 1997 03:00:00 GMT  
 ?? long strings?

says...
Quote:

>I have a character string variable which is 409 characters in length. I
>want to ?? it to a file, but when I do it insists on putting a CR/LF in the
>middle of it. This is because I have set MEMOWIDTH to 256 (the maximum
>possible) so it prints it with a CR/LF after each 256 characters. Is there
>any way I can do a ?? of the whole string without any breaks? My viewing

[snipped]

One answer is to use low level file read and write. In FoxPro for DOS some of
the functions to look into are: FOPEN(), FCREATE(), FWRITE(), FREAD(), FSEEK(),
and FCLOSE() and any other related functions. You are limited only in the
capacity of the variables you use. Worked for me in the past with text blocks of
8192 bytes per from very large files (doing a word/string search for keywords.).

--
Ralph
... and NO, I speak for no one else but me, myself and I, of course.
Ratz! "They" lost the contract. This address may no longer be in service.




Fri, 10 Oct 1997 03:00:00 GMT  
 ?? long strings?

Quote:

>I have a character string variable which is 409 characters in length. I
>want to ?? it to a file, but when I do it insists on putting a CR/LF in the
>middle of it. This is because I have set MEMOWIDTH to 256 (the maximum
>possible) so it prints it with a CR/LF after each 256 characters. Is there
>any way I can do a ?? of the whole string without any breaks? My viewing
>program that I use later has it's own wor-wrap facility so I don't want
>FoxPro making arbitrary breaks in the middle.

If you can't beat em join em:

? ""
for x = 1 to memlines( longvar )
        ?? mline( longvar, x)
endfor

-doug

Quote:

>Dave
>--
>-------------------------------------------------------------------------


>|                          |  Fax                  - 60-3-2612870       |
>|  Kuala Lumpur, Malaysia  |  Compuserve ID        - 70461,2360         |
>-------------------------------------------------------------------------

--
=====================================================================

Computer Science                                    Cognitive Science
=====================================================================


Sat, 11 Oct 1997 03:00:00 GMT  
 ?? long strings?
If you're using SET PRINTER TO to create the file, try using ??? instead
of ??. Or if it's feasible, use the low-level file functions to FCREATE
the file, FWRITE/FPUTS your 409-byte string to it then FCLOSE it
afterwards.

Keith Trangmar, Harlend Computer Services
Dartford, Kent. UK.

"Can't think of anything witty to put at the end of my sig"



Mon, 13 Oct 1997 03:00:00 GMT  
 ?? long strings?
DB>I have a character string variable which is 409 characters in length.
DB>I want to ?? it to a file, but when I do it insists on putting a
DB>CR/LF in the middle of it. This is because I have set MEMOWIDTH to
DB>256 (the maximum possible) so it prints it with a CR/LF after each
DB>256 characters. Is there any way I can do a ?? of the whole string
DB>without any breaks? My viewing program that I use later has it's own
DB>wor-wrap facility so I don't want FoxPro making arbitrary breaks in
DB>the middle.

DB>Dave

How about sticking the string into a memo field in a dbf (or a temporary
cursor) and then copying that to a file.
---
* CMPQwk #1.42-R2* UNREGISTERED EVALUATION COPY



Wed, 15 Oct 1997 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Long, long character string

2. Help: String to Long to fit!

3. STRTRAN() to fix ASCII: Error 1903: String is too long to fit

4. String too long in PICTURE "@M"

5. string to long error

6. Beware the String Too Long To Fit

7. Long string problems

8. String for Pass Through command too long

9. Help Anyone (who has experience processing Long Ascii Strings)

10. Long macro command string

11. how long can a string be ?

12. String is too long to fit

 

 
Powered by phpBB® Forum Software