intfiction.org

The Interactive Fiction Community Forum
It is currently Mon Nov 12, 2018 2:00 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Sun May 27, 2018 5:33 am 
Offline

Joined: Sun Feb 11, 2018 7:25 pm
Posts: 4
Hi,

Given a class definition like this
Code:
class Foo: object
  construct( length ) {
    vector = new Vector( length );
  }
;
how do I get rid of this warning?
Quote:
warning: undefined symbol "vector" - assuming this is a property name
Is there a way to specify a property "to be filled in later?"


Top
 Profile Send private message  
Reply with quote  
PostPosted: Sun May 27, 2018 1:34 pm 
Online

Joined: Wed Jun 09, 2010 2:15 pm
Posts: 27
just add the following line of code to the Foo class but outside of the construct method

vector = nil

that will define the symbol and stop that warning.


Top
 Profile Send private message  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: fos1 and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group