faqts : Computers : Programming : Languages : Bbcbasic

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

1 of 1 people (100%) answered Yes
Recently 1 of 1 people (100%) answered Yes

Entry

Language: Computer: BASIC: BBCBASIC: Windows: How to create a nul terminated string?

Apr 30th, 2006 15:46
Knud van Eeden,


----------------------------------------------------------------------
--- Knud van Eeden --- 30 April 2006 - 10:13 pm ----------------------

BBCBASIC: Windows: String: Nul terminated: How to create a nul 
terminated string?

Use the

 $$

operator.

===

General format:

 $$<your integer variable name> = "<your constant string>"

---

E.g.

--- cut here: begin --------------------------------------------------

$$A% = "test2"

$$B% = "test2"

END

--- cut here: end ----------------------------------------------------

---

Note: You will need at least BBCBASIC for Windows v5.10a or higher for
      this to work

---

You need the null terminated string when using Microsoft Windows API 
functions
(via 'SYS' in BBCBASIC for Windows)

===

Tested successfully on
Microsoft Windows XP Professional (service pack 2),
running
BBCBASIC for Windows v5.10b

===

Internet: see also:

---



----------------------------------------------------------------------