Hi,
Do these two functions work with the entire ASCII character set?
READ#1, rectRecord$;1
PRINT#2, rectRecord$;
I wrote a program to strip out LineFeeds where a CR+LF pair is encountered
(so I can print this "PC" file from my Mac without extra blank lines). Odd
thing is after I convert the file other characters seem to be affected too. I
counted all the ASCII characters before converting and after converting to a
new file. See below.
This is basically the code that does that:
y&=LOF(1,1)
FOR x&=1 TO y&
READ#1, rectRecord$;1
IF ASC(prev$)=13 AND ASC(rectRecord$)=10 THEN "skipLF"
PRINT#2, rectRecord$;
"skipLF"
prev$=rectRecord$
NEXT x&
CLOSE #1:CLOSE #2
Anybody know why it appears many characters aren't getting Print#ed to the
new file?
I also wrote another program to sort through EZ-Pass toll data (downloaded
from a web page). In the file each "field" is separated by a bunch of spaces.
I go through and take out the spaces and replace it with a Tab (all the ch
aracters are regular ASCII 65-122, A-z ,ect.). This data then gets imported
into a Helix database. Thought I had it working great....then when I checked
totals on one of the two months I did I found FB was not writing the first
record (set of text items separated by a tab)...but the other 200 records or
so wrote to disk fine. Odd!!! AND...If I immediately re-run the same
identical program the first "record" DOES get sent to the file! What the heck
is going on! I can repeat this over and over. This has me completely baffled.
And it only does it with one months file, but not the other. Weird. What
would cause that? Again, it's a fairly simple program...I see no reason for
it to not write the ASCII text. This kind of stuff drives me crazy....
Any suggestions appreciated....
Jeff-
===========BEFORE CONVERSION===========================
ASCII Character Count: FILE Length: 90382
File: "OrderBatch 11-20-01 10.32"
0. NULL 483
1. SOH 269 Start of Heading
2. SOT 66 Start of Text (STX)
4. EOTR 59 End of Transmission (EOT)
10. LF 377
11. VT 30
12. FF 8
13. CR 377
27. ESC 374 Escape
32. SPACE 12281
35. # 3
38. & 3
39. ' 7
44. , 70
45. - 243
46. . 222
47. / 21
48. 0 380
49. 1 579
50. 2 389
51. 3 194
52. 4 114
53. 5 140
54. 6 177
55. 7 102
56. 8 91
57. 9 94
58. : 58
60. < 12
61. = 78
62. > 12
64. @ 87
65. A 224
66. B 117
67. C 227
68. D 97
69. E 281
70. F 69
71. G 100
72. H 117
73. I 268
74. J 21
75. K 12
76. L 286
77. M 263
78. N 282
79. O 325
80. P 72
82. R 229
83. S 235
84. T 257
85. U 86
86. V 32
87. W 84
88. X 56
89. Y 35
91. [ 177
97. a 280
98. b 65
99. c 132
100. d 209
101. e 486
102. f 95
103. g 78
104. h 157
105. i 277
106. j 8
108. l 139
109. m 61
110. n 181
111. o 215
112. p 77
114. r 310
115. s 204
116. t 257
117. u 126
118. v 42
119. w 31
121. y 28
122. z 7
235. Î 1
237. Ì 28
LF+CR count= 44
CR+LF count= 377
==========AFTER CONVERSION======================
ASCII Character Count: FILE Length: 89019
File: "OrderBatch 11-20-01 10.32 Print"
0. NULL 459
1. SOH 253 Start of Heading
2. SOT 63 Start of Text (STX)
4. EOTR 57 End of Transmission (EOT)
11. VT 29
12. FF 8
13. CR 359
27. ESC 346 Escape
32. SPACE 11726
35. # 3
38. & 3
39. ' 7
44. , 69
45. - 221
46. . 218
47. / 20
48. 0 369
49. 1 557
50. 2 376
51. 3 188
52. 4 112
53. 5 134
54. 6 173
55. 7 98
56. 8 88
57. 9 90
58. : 57
60. < 12
61. = 78
62. > 12
64. @ 84
65. A 216
66. B 115
67. C 218
68. D 95
69. E 273
70. F 68
71. G 97
72. H 112
73. I 260
74. J 21
75. K 9
76. L 278
77. M 258
78. N 275
79. O 320
80. P 66
82. R 225
83. S 226
84. T 249
85. U 82
86. V 32
87. W 81
88. X 55
89. Y 33
91. [ 171
97. a 274
98. b 62
99. c 125
100. d 203
101. e 468
102. f 94
103. g 74
104. h 154
105. i 269
106. j 8
108. l 138
109. m 58
110. n 172
111. o 205
112. p 75
114. r 300
115. s 195
116. t 251
117. u 120
118. v 41
119. w 31
121. y 28
122. z 6
235. Î 1
237. Ì 27
LF+CR count= 0
CR+LF count= 0