To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.nqcOpen lugnet.robotics.rcx.nqc in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / NQC / 1185
1184  |  1186
Subject: 
Re: SetWatch() only accepts constants
Newsgroups: 
lugnet.robotics.rcx.nqc
Date: 
Tue, 7 Aug 2001 23:35:31 GMT
Viewed: 
2479 times
  
"Frederick N. Brier" wrote:

I just wrote a task and function that cause the RCX to receive data from the
PC and then set the time on the RCX using SetWatch().  Unfortunately, I
didn't realize that SetWatch() only accepts constants.  NQC complained when
integer variables were passed.  Is this because the special SetWatch()
opcode only accepts embedded constants and not references to memory
variables?  That probably is what is going on, but if not, would it be
possible to change it so it can accept variables?

It sure would have been useful to set the system time from the computer.  It
doesn't make a lot of sense to have a function that sets the system time
only except an embedded constant.  "You must only run this program at
Midnight for the system time to be set properly."

You can use the NQC -watch now
command to set the time.

Dean



Message is in Reply To:
  SetWatch() only accepts constants
 
I just wrote a task and function that cause the RCX to receive data from the PC and then set the time on the RCX using SetWatch(). Unfortunately, I didn't realize that SetWatch() only accepts constants. NQC complained when integer variables were (...) (23 years ago, 7-Aug-01, to lugnet.robotics.rcx.nqc)

4 Messages in This Thread:



Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR