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 / 1135
1134  |  1136
Subject: 
Re: NQC 2.4 beta test
Newsgroups: 
lugnet.robotics.rcx.nqc
Date: 
Thu, 10 May 2001 02:22:56 GMT
Viewed: 
2188 times
  
In article <3AF99B56.9488D438@mail.com>, Rik Blok <RikBlok@mail.com>
wrote:

Dave, does NQC have version specific #defines?  I want to write some
code that would compile differently depending on the version of NQC.
Something like:

#ifndef _NQC24_    ...or...    #if (_NQC_ < 24)
   #include "bitShift.nqh"
#endif

#ifdef _NQC24_     ...or...    #if (_NQC_ >= 24)
    x >>= 5;
#else
    bitShiftRight(x,5,x);
#endif


Sorry, NQC doesn't have anything like that right now, but its a good
idea.  I'll make sure it gets added before 2.4 goes final.

I like __NQC__ taking on a numeric value, and I'd want to leave room for
more than 10 minor versions per major version, so eventually you could do

#if __NQC__ >= 204  // see if greater than 2.4
#endif

Dave

--
reply to: dbaum at enteract dot com



Message has 1 Reply:
  Re: NQC 2.4 beta test
 
(...) Great! Thanks for all your hard work, Dave. - Rik. (24 years ago, 10-May-01, to lugnet.robotics.rcx.nqc)

Message is in Reply To:
  Re: NQC 2.4 beta test
 
Dave, does NQC have version specific #defines? I want to write some code that would compile differently depending on the version of NQC. Something like: #ifndef _NQC24_ ...or... #if (_NQC_ < 24) #include "bitShift.nqh" #endif #ifdef _NQC24_ ...or... (...) (24 years ago, 9-May-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

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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