[solved] Type|Union typename Extends base_typename ?

General FreeBASIC programming questions.
Post Reply
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

[solved] Type|Union typename Extends base_typename ?

Post by D.J.Peters »

First time I try to use extends with enum and I don't understand the wiki page: https://www.freebasic.net/wiki/wikka.ph ... yPgExtends
(The page is OK but my limited english is the problem for me.)

How to solve the compile error ?

Joshy

Code: Select all

enum eTWO ' Two Valued Logic
  L = 0 ' L state = low  level logic 0=false
  H     ' H state = high level logic 1=true
end enum  

enum eTHREE extends eTWO ' Three Valued Logic
  Z     ' add the Z state = high impedance (floating)
end enum

enum eFOUR extends eTHREE ' Four Valued Logic
  X     ' add the X state = don't care
end enum
Last edited by D.J.Peters on Nov 23, 2017 22:25, edited 1 time in total.
fxm
Moderator
Posts: 12107
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Type|Union typename Extends base_typename ?

Post by fxm »

'Extends' works only with 'Type' or 'Union'.
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

Re: Type|Union typename Extends base_typename ?

Post by D.J.Peters »

fxm wrote:'Extends' works only with 'Type' or 'Union'.
Ups I need new glasses on my nose :-(

Thank you

Joshy
fxm
Moderator
Posts: 12107
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: [solved] Type|Union typename Extends base_typename ?

Post by fxm »

Yes, the answer even was in your topic title.
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

Re: [solved] Type|Union typename Extends base_typename ?

Post by D.J.Peters »

This happens if you sit 40 hours in front of your monitor without a break or sleep.

Joshy
Post Reply