GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Download
  • News
  • Community
  • Resources
  • Language Reference
  • SmallBASIC Manual

This view

  • Original page
  • New address

GeezerVison is showing smallbasic.github.io — SmallBASIC | BPUTC

Edit History

BPUTC

BPUTC #fileN, byte

Home > Reference > File

Writes a byte byte on file or device in binary mode.

See BGETC for reading bytes from a file or device.

Example

' create a binary file
open "BinaryFile.txt" for output as #1

for c = 0 to 255
    bputc #1, c
next

close #1

' open binary file and print content
open "BinaryFile.txt" for input as #1

for i = 0 to 255
    c = bgetc(1)
    print CHR(c);
next

close #1
Code samples using BPUTC
loadsavebmp.bas   loadsavebmp_fltk.bas  
File
ACCESS   BGETC   BLOAD   BPUTC   BSAVE   CHDIR   CHMOD   CLOSE   COPY   DIRWALK   EOF   EXIST   FILES   FREEFILE   INPUT   INPUT   KILL   LOCK   LOF   MKDIR   OPEN   READ   RENAME   RMDIR   SEEK   SEEK   TLOAD   TSAVE   WRITE  
This page was last edited on Tue, 19 Sep 2023 14:44:03 +0200 | Markdown processed with pandoc 3.1.12.1
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.