Comments (3)
Instead of "length string" it should be "string length", or "length of the string in the buffer variable".
Except for that, I'm not offering suggestions, only explanations. The original wording may not be precise, but it is certainly concise. There's a lot of information in there, and there's a lot of latitude in deciding how much to write.
There's a logical leap from the abstract "<buffer_svar>" to the concrete example "buf$". You're resolved it by referring to the string length function len() by name without an argument, which is a common practice but still requires the reader to make a logical connection, and without benefit of the telltale '$'.
There's another leap that takes longer to explain, but it's still logical. If you're reading data and you reach the end of the file, the buffer contains the data you read, so its length is not zero. If after reaching the end of the file you read it again, you don't get an error, and you don't get a special EOF indicator. You get an empty (zero-length) buffer. The only way to know you've read the entire file is to read it again until you get a zero-length string -- that is, until len(<buffer_svar>) returns 0. This may be counter-intuitive to a C programmer, or somebody who uses sockets a lot instead of files.
Finally, there is no mention of what happens if <count_nexp> is bigger than the file. Is that a sin of omission, or does leaving it out imply that BASIC! does the intuitively obvious "right thing"? Okay, that's reaching a little!
from de-re-basic.
Good points. Changed "length string" to "string length" (how'd I miss that?). Put in the parameter arguments explicitly instead of buf$. I'm passing on the fourth and fifth paragraphs as they move the text too far (IMHO) in the direction of a "how to" manual, as opposed to a reference manual. I'm certainly open to revisit this if anyone thinks I should.
from de-re-basic.
I think you got it right.
from de-re-basic.
Related Issues (20)
- Missed German Aged Translation For the First Start
- Change one time "Socket.server.status" to "socket.client.status" on page 122
- Gr.paint.reset Style FILL
- Screen rotation, size[], realsize[], density
- Picture on the basic! manual HOT 11
- Camera options in v01.76 HOT 1
- Adding a parameter to SQL.Delete HOT 1
- Array.search HOT 1
- "Continue" statements HOT 1
- Enhanced Array.copy HOT 1
- Appendix D HOT 2
- New console commands HOT 1
- New graphics info commands HOT 1
- New command console.line.count HOT 1
- New functions INT(), FRAC(), and SGN() HOT 1
- Undocumented keyword: CONSOLE.FRONT HOT 1
- Problem with forum?
- Cyrillic symbols HOT 2
- Gr.bitmap.save Quality Range
- Sql.query Sorting Text Values Case Independent
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from de-re-basic.