Graal Forums  

Go Back   Graal Forums > Graal V6 forums > Announcements
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 05-18-2007, 11:08 PM
JkWhoSaysNi JkWhoSaysNi is offline
Ruler of the graalaxy
Join Date: Feb 2005
Location: Great Britain
Posts: 488
JkWhoSaysNi is on a distinguished road
Send a message via ICQ to JkWhoSaysNi
now i remember! I wanted some OO functionality without using classes.
If I did this:

PHP Code:
public function increment() {
this.count++;
}

function 
onCreated() {
 
= new TStaticVar;
 
x.increment this.increment;
 
x.count 1;
 
x.increment();  //x.count = 2?

Will x.count get incremented when x.increment() is called or will count get incremented in the script which created x?
__________________

Coming soon (Hopefully:P)
Reply With Quote
  #2  
Old 05-19-2007, 01:46 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Quote:
Originally Posted by JkWhoSaysNi View Post
Will x.count get incremented when x.increment() is called or will count get incremented in the script which created x?
x.count will be incremented
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 +2. The time now is 05:09 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.