PowerBASIC Peer Support Forums

Go Back   PowerBASIC Peer Support Forums > User to user Discussions > Programming with Objects

Programming with Objects User to user discussions about programming with objects, including COM objects.

Thread Tools Display Modes
Old Apr 18th, 2012, 09:46 AM
Scott Slater Scott Slater is offline
Join Date: Aug 1999
Posts: 1,151
It has always worked this way. If you are unsure you can always add;


to your source file.
Scott Slater
Summit Computer Networks, Inc.
Reply With Quote
Old Apr 18th, 2012, 10:11 AM
Michael Mattias Michael Mattias is offline
Join Date: Aug 1998
Location: Racine WI USA
Posts: 38,710
The problem is that if you change it to "REDIM ArrayName(number) AS type", it does create a new array with scope LOCAL.
This is undocumented (Help just says that "as type" is optional).
ISTR this "phenomenon" being reported by others in the context of "procedures, " not just in the context of "Interfaces" ... anything other than simple 'REDIM arrayname(new_bounds) [ end of statement]' will create a 'new' array using the type and scope specified.

I just, out of force of habit now that everything works, always do this:
 Procedure Foo (params) 

  LOCAL   arrayname() AS type      ' define the symbol 

  REDIM arrayname (number)        '  create the array so it exists and may be used 
                                  ' datatype and scope already defined above
Apparently I won't have to change anything should I desire to create my own INTERFACEs with METHODs.

Reply With Quote

10.03, bug, oop

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -4. The time now is 01:39 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.
Copyright 1999-2011 PowerBASIC, Inc. All Rights Reserved.
Error in my_thread_global_end(): 1 threads didn't exit