Available on: atari, coco
See also: PEEK MESSAGE DOJO ERROR
Alias: DOJO GET MESSAGE

GET MESSAGE

The GET MESSAGE statement allows you to retrieve the message present on the specified port (port), and possibly on the specific channel (channel). If used as a function, the message is returned as a string; otherwise, the type of the given variable is used to parse the incoming type. If there are no messages at the time of the call, or if the port is unknown, an empty string will be returned or the given variable is untouched. The actual error must be retrieved with the DOJO ERROR command. If you want to avoid fetching a message from an empty message queue, you can use the PEEK MESSAGE statement. Note that MESSAGE keyword is optional.

SYNTAX

 = [DOJO] GET [MESSAGE]( port[, channel] )
 [DOJO] GET [MESSAGE] port[, channel], variable


Legend
  • id : identifier
  • type : datatype
  • v : value
  • "..." : string
  • [...] : optional

EXAMPLE

 message = GET MESSAGE( myPort, myChannel )
 DIM a(42): GET MESSAGE myPort, 42, a


ABBREVIATION: GeMa

Join BASIC 10Liner Contest with ugBASIC!

An interesting competition is held at the beginning of each year: the BASIC 10Liner Contest. It is possible to use ugBASIC to participate in the next "BASIC10Liner" competition, in the following categories:

  • PUR-120 - A game in 10 lines of max 120 characters (w/abbrev.)
  • EXTREME-256 - A game in 10 lines of max 256 characters (w/abbrev.)
  • SCHAU - Any program in 10 lines of max 256 characters (w/abbrev.)
In order to reduce space you can use this abbreviation for this instruction:

GET MESSAGE ↔ GeMa

Any problem?

If you have found a problem with this keyword, if you think there is a bug or, more simply, you would like it to be improved, open an issue for this example on GitHub.
Thank you!

open an issue BACK TO KEYWORDS