volatile variable

Please support our Perl advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Sep 2006
Posts: 50
Reputation: kararu is an unknown quantity at this point 
Solved Threads: 0
kararu kararu is offline Offline
Junior Poster in Training

volatile variable

 
0
  #1
Sep 16th, 2006
Hi all, Is there anything in perl to declare a variable volatile...I need the value of a variable to change immeadiately when I change.help out pls.
Reply With Quote Quick reply to this message  
Join Date: Mar 2006
Posts: 898
Reputation: KevinADC has a spectacular aura about KevinADC has a spectacular aura about 
Solved Threads: 67
KevinADC's Avatar
KevinADC KevinADC is offline Offline
Practically a Posting Shark

Re: volatile variable

 
0
  #2
Sep 16th, 2006
variables always change when you redefine them or use operators or functions on them. Not sure what your question is.
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 50
Reputation: kararu is an unknown quantity at this point 
Solved Threads: 0
kararu kararu is offline Offline
Junior Poster in Training

Re: volatile variable

 
0
  #3
Sep 17th, 2006
Actually a variable will stay in register for a while and then be put in memory..I need the memory location to change immediately when I change the variable.(Like volatile variable in C)
Reply With Quote Quick reply to this message  
Join Date: Mar 2006
Posts: 898
Reputation: KevinADC has a spectacular aura about KevinADC has a spectacular aura about 
Solved Threads: 67
KevinADC's Avatar
KevinADC KevinADC is offline Offline
Practically a Posting Shark

Re: volatile variable

 
0
  #4
Sep 17th, 2006
I don't know how to do that in perl or why you would even need to do it but I assume you know why and have a legitimate reason. Maybe someone else will know.
Reply With Quote Quick reply to this message  
Join Date: Mar 2006
Posts: 898
Reputation: KevinADC has a spectacular aura about KevinADC has a spectacular aura about 
Solved Threads: 67
KevinADC's Avatar
KevinADC KevinADC is offline Offline
Practically a Posting Shark

Re: volatile variable

 
0
  #5
Sep 17th, 2006
comment removed, irrelevant.
Last edited by KevinADC; Sep 17th, 2006 at 9:06 pm.
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 2,415
Reputation: masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of 
Solved Threads: 256
Moderator
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Maven

Re: volatile variable

 
0
  #6
Sep 18th, 2006
I would suggest searching www.cpan.org for some memory management module that might provide this functionality. Even if it is possible from straight perl, it is probably complicated or convoluted and a module from CPAN would probably make it a bit simpler to use (or at least let you study it to find out how to do it on your own).
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Perl Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC