Ooops
July 26, 2021, 14:35:31

Author Topic: Private in BlitzMax 1.50  (Read 86 times)

Offline Midimaster

  • Sr. Member
  • ****
  • Posts: 329
    • Midimaster Music Education Software
Private in BlitzMax 1.50
« on: July 15, 2021, 09:15:43 »
I'm trying to build a common version of my FreeAudioRingBufferClass for BlitzMax NG and BlitzMax 1.50.

I could handle all differences except one last.

I looks like the old BlitzMax 1.50 does not accept PRIVATE code areas within TYPES.


This is the plan and compiles on BlitzMax NG
Code: BlitzMax
  1. SuperStrict
  2. Type RingBufferClass
  3. Public
  4.         .....
  5.         Function SetDriver(Driver$)
  6.                 ...
  7.         End Function  
  8.  
  9.  
  10.         Method Send(AudioArray:Int[])
  11.                 ...
  12.         End Method     
  13.  
  14. '    I N T E R N A L   F U N C T I O N S :
  15. Private
  16.  
  17.         Method Watch()
  18.                 ...
  19.         End Method  
  20.         .....
  21. End Type
  22.  

When I try this on old BlitzMax 1.50 i get this error message:
Code: [Select]
Compile Error: Syntax error in user defined type declaration
[C:/Basic/RingBuffer/RingBufferClassFinal.bmx;177;1]
Build Error: failed to compile C:/Basic/RingBuffer/RingBufferClassFinal.bmx


As a workaround I do it this way at the moment:
Code: BlitzMax
  1.  
  2. ?bmxng
  3. Private
  4. ?
  5.  
This compiler directive is only known on BlitzMax NG and content is ignored on BlitzMax 1.50


Does somebody know more about this PRIVATE behavoir inside TYPES?
« Last Edit: July 15, 2021, 10:24:37 by Midimaster »
See my current project on PlayStore: 20Tracks-Audio-Player https://play.google.com/store/apps/details?id=midimaster.twentytrackd

Offline Derron

  • Hero Member
  • *****
  • Posts: 3613
Re: Private in BlitzMax 1.50
« Reply #1 on: July 15, 2021, 09:32:49 »
you already found it out: blitzmax legacy/vanilla does not allow "private" (and protected/public) inside types.


bye
Ron

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal