Menu

The need to supress that end of file character

Anonymous
2017-01-03
2017-01-12
  • Anonymous

    Anonymous - 2017-01-03

    One of the most valued uses of BASIC for me in the last decade, is to create webpages. All files to do with websites, from HTML, CSS, and JS too. I also have the perfect transfer program. One directory is for my works, while a second is for what I dump onto the server via FTP.

    I have the progam set up, with a series of files I want on the server in the DATA statement of the program, so it knows what files to copy over to the output file. Then, when I load up the FTP program, and just copy all files in the output directory. I never need to think as to which files go, and which ones stay.

    One of the problems is, Javascript does not like the end of file character in its file.

    I would suggest new letters for the Open statement. Say, B in place of A, and P in place of O. To be identical to A and O, except they do not print that character at the end.

    Also, while I am here, related ideas I would like to suggest is, could the Open statement be used for HTTP and/or FTP in some way? Perhaps in place of the file, that is where the URL goes? Perhaps letters such as H for header only?

    Last wish on my list is, the ability to load the directory of files into an array for use by the program. I mean, like the Files statement, execpt not go to screen, but into an array. I could then use my program to transfer all files of a partilcular type, rather than have that data statement to manually update each time.

     
  • Rob Hagemans

    Rob Hagemans - 2017-01-03

    Hi, thanks for your interest! Sorry, I have no plans to extend the syntax of PC-BASIC or the OPEN statement beyond the capabilities of GW-BASIC - I am focussing on maximising compatibility for existing programs.

    Perhaps you could use a shell script (or Python, or JS itself) to remove the &h1A end-of-file marker from the files your program generates?

     
  • Anonymous

    Anonymous - 2017-01-12

    Here's a suggestion for the original poster: check out QB64. It is a more modern version of QBasic, which is mostly compatible with GW-BASIC, even if not 100%. However, their developers have a different stance on new features, and actually implement quite a few new things that didn't exist in the original QBasic. You might find it more suitable for your purposes. Networking (TCP/IP, at least), for instance, is implemented in QB64 as of right now, and you can use it fairly easily.