About: Buffers   Sponge Permalink

An Entity of Type : owl:Thing, within Data Space : 134.155.108.49:8890 associated with source dataset(s)

Buffers are like strings, but with a much more specific purpose. A string is good at holding text, but adding stuff to it is pretty slow. If you need to do a whole bunch of little inputs to something, a buffer is a better choice over a string. Its main use is File I/O. After text has been dumped into a buffer, it is considerably faster to deal with it as a string.

AttributesValues
rdfs:label
  • Buffers
rdfs:comment
  • Buffers are like strings, but with a much more specific purpose. A string is good at holding text, but adding stuff to it is pretty slow. If you need to do a whole bunch of little inputs to something, a buffer is a better choice over a string. Its main use is File I/O. After text has been dumped into a buffer, it is considerably faster to deal with it as a string.
  • The :e <i>filename</i> command can edit an existing file or a new file. When a file is edited, the file is read into a new buffer that holds a temporary copy of the file (or an empty buffer for a new file). Editing makes changes to the buffer. To save a file, the original file is replaced by writing the buffer to disk. The :new command creates a new window displaying the contents of a new (empty) buffer. To list all buffers use the :ls command. Each buffer is assigned a number that is displayed in the first column. help :ls]. The third column is the file name associated with the buffer.
  • Buffers are used to deliver data through web hosts on GameMaker. Those were used to create online games on GameMaker. So, say you have created a buffer and you want to write information to it, then you would use something like the following code: buffer_write(buff, buffer_bool, global.Sound); buffer_write(buff, buffer_bool, global.Music); buffer_write(buff, buffer_s16, obj_Player.x); buffer_write(buff, buffer_s16, obj_Player.y); buffer_write(buff, buffer_string, global.Player_Name); buffer_read(buffer, type)
  • Buffers can occasionally break if an engine goes too fast and crashes into them. Thomas once damaged his front by charging towards the buffers while showing off his race with Bertie to Jinty (Oliver in the TV series) and Percy broke two different sets of buffers, one of which led him into a pile of coal. Donald and Douglas also had their own mishaps with a set of buffers they kept on crashing into, one of which the latter was unfairly blamed for.
Version
  • 7(xsd:integer)
dcterms:subject
dbkwik:ttte/proper...iPageUsesTemplate
dbkwik:vim/property/wikiPageUsesTemplate
Previous
  • 1662(xsd:integer)
Category
  • Getting started
Subpage
  • /201008
Complexity
  • basic
Created
  • 2010-08-30(xsd:date)
ID
  • 1663(xsd:integer)
NEXT
  • 1664(xsd:integer)
abstract
  • Buffers are used to deliver data through web hosts on GameMaker. Those were used to create online games on GameMaker. So, say you have created a buffer and you want to write information to it, then you would use something like the following code: buffer_write(buff, buffer_bool, global.Sound); buffer_write(buff, buffer_bool, global.Music); buffer_write(buff, buffer_s16, obj_Player.x); buffer_write(buff, buffer_s16, obj_Player.y); buffer_write(buff, buffer_string, global.Player_Name); looking at the example above you can see that you can write different types of data to a buffer (you are only limited to a specific data type when using the fast buffer type), and this data will be added into the buffer consecutively (although its actual position in the buffer will depend on its byte alignment, explained below). This is the same for reading information from the buffer too, and in the case of the example given above, you would read from the buffer in the same order that you wrote the data, checking for the same data type, eg: global.Sound = buffer_read(buff, buffer_bool); global.Music = buffer_read(buff, buffer_bool); obj_Player.x = buffer_read(buff, buffer_s16); obj_Player.y = buffer_read(buff, buffer_s16); global.Player_Name = buffer_read(buff, buffer_string); buffer_read(buffer, type)
  • The :e <i>filename</i> command can edit an existing file or a new file. When a file is edited, the file is read into a new buffer that holds a temporary copy of the file (or an empty buffer for a new file). Editing makes changes to the buffer. To save a file, the original file is replaced by writing the buffer to disk. The :new command creates a new window displaying the contents of a new (empty) buffer. To list all buffers use the :ls command. Each buffer is assigned a number that is displayed in the first column. The second column describes the state of the buffer. The different states are explained at [help :ls]. The third column is the file name associated with the buffer.
  • Buffers are like strings, but with a much more specific purpose. A string is good at holding text, but adding stuff to it is pretty slow. If you need to do a whole bunch of little inputs to something, a buffer is a better choice over a string. Its main use is File I/O. After text has been dumped into a buffer, it is considerably faster to deal with it as a string.
  • Buffers can occasionally break if an engine goes too fast and crashes into them. Thomas once damaged his front by charging towards the buffers while showing off his race with Bertie to Jinty (Oliver in the TV series) and Percy broke two different sets of buffers, one of which led him into a pile of coal. Donald and Douglas also had their own mishaps with a set of buffers they kept on crashing into, one of which the latter was unfairly blamed for. Sometimes, if a siding has no buffers for the line to end on, serious accidents will occur, such as when Thomas crashed into a stationmasters house when the siding he was on had no buffers to stop him. Duck also had a mishap when he crashed into a barber shop when there were no buffers at the end.
Alternative Linked Data Views: ODE     Raw Data in: CXML | CSV | RDF ( N-Triples N3/Turtle JSON XML ) | OData ( Atom JSON ) | Microdata ( JSON HTML) | JSON-LD    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 07.20.3217, on Linux (x86_64-pc-linux-gnu), Standard Edition
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2012 OpenLink Software