Roy,
Try the following
Regards,
Anssi
'************************************
Declare Sub Main
Sub Main
Dim iFile, oFile, strDelim, strDummy, strPrint As String
Dim iFixlen As Integer
iFile = FileOpenDlg("","","TXT","Define input file")
oFile = FileSaveAsDlg("","","TXT","Define output file")
strDelim = ","
iFixlen = 256
Open File iFile For Input As #1 Charset "Neutral"
Open File oFile For Output As #2 Charset "Neutral"
Do While Not EOF(1)
Line Input #1, strDummy
If Len(strPrint) + Len(strDummy) + Len(strDelim) > iFixlen Then
Print #2, strPrint
strPrint = strDummy & strDelim
Else
strPrint = strPrint & strDummy & strDelim
End If
Loop
Close File #1
Close File #2
Run Program "Notepad.exe " & oFile
End Sub
'************************************
----- Original Message -----
From: Roy N. Chiappini <[EMAIL PROTECTED]>
To: MapInfo List <[EMAIL PROTECTED]>
Sent: Tuesday, August 08, 2000 1:05 AM
Subject: MI MapBasic Question
> Thanks in advance!
>
> I have a bunch of files that require a change from vertical to
> horizonal. Such as:
> From
> 123
> 456
> 789
> 101112
> 131415
>
> to:
> 123,456,789,101112,131415
>
> These files are super long. Result will have to at least 256 values
> wide.
>
> I seem to remember back in my FORTRAN days that a write to file followed
> by a , or ; would suppress the line feed/CR.
>
> Can't for the life of me figure it out in MapBasic (without use of a
> super long Format statement).
>
> Hope there is a simple solution.
>
> Thanks
>
> Roy
> ----------------------------------------------------------------------
> To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
> "unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]