DGROUP & TYPEd variables

 BBS: Inland Empire Archive
Date: 05-18-92 (10:24)             Number: 161
From: MICHAEL MALLEY               Refer#: NONE
  To: BILL BEELER                   Recvd: NO  
Subj: DGROUP & TYPEd variables       Conf: (2) Quik_Bas
BB>temporary usage to copy the far string to near. Declaration
BB>and DIMensioning a TYPE adds nothing (or better said, takes
BB>nothing) to/from DGROUP.

BB>PRINT FRE("")
BB>DIM W AS Whatever
BB>PRINT FRE("")

Bill, once you have a variable diminsioned as a particular TYPE, that
variable's space is already removed from DGROUP prior to execution.
That is to say, the space is already allocated, therefore, you would not
be able to notice the difference during runtime.  Take this example:

  TYPE Garbage
      Junk AS STRING * 255
  END TYPE

  DIM Junk AS Garbage
  PRINT FRE("")

This produces: 60936

  TYPE Garbage
      Junk AS STRING * 255
  END TYPE
  PRINT FRE("")

This produces: 61192, exactly 256 bytes more during runtime.

- Michael  :)

 * SLMR 2.1a * {SLMR Error 2A - C Bashing Incurred}

--- Maximus 2.01wb
 * Origin: UltraTech - Nashville, TN  (615) 356-0453 {HST} (1:116/30)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET