What does "others : begin NO" mean?

A

Altera User

const NO : boolean := false;
activeFlag_x = (others : begin NO);

I know what "(others => '0')" means, but I can't figure out the above?
Is it simply saying 'fill all bits with the repeating bitpattern 'NO'?
 
M

Mike Treseler

Altera said:
const NO : boolean := false;
activeFlag_x = (others : begin NO);

I know what "(others => '0')" means, but I can't figure out the above?

Neither can I.
VHDL has no const class.
'begin' is misused.

Find a better example.

-- Mike Treseler
 
J

Jonathan Bromley

const NO : boolean := false;
activeFlag_x = (others : begin NO);

I know what "(others => '0')" means, but I can't figure out the above?

It means that either
a) someone has made a few bad keystrokes on a smart text
editor that has keyboard shortcuts for VHDL keywords, or
b) someone has used a badly flawed template file (and yes,
such things do exist), or
c) someone was coding whilst making use of (in Peter Cook's
unforgettable phrase) recreational pharmaceuticals.

I suspect the line should have said

activeFlag_x := (others => NO);

but it's really anyone's guess.

The really interesting question is: how is it that someone
allowed code like this, which has no chance of getting past
any compiler, leak out from their text editor into the wild?
--
Jonathan Bromley, Consultant

DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services

Doulos Ltd., 22 Market Place, Ringwood, BH24 1AW, UK
(e-mail address removed)
http://www.MYCOMPANY.com

The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.
 
M

Mark McDougall

Jonathan said:
It means that either

(d) Someone is using a pre-processor on their VHDL code.
The really interesting question is: how is it that someone
allowed code like this, which has no chance of getting past
any compiler, leak out from their text editor into the wild?

See above.

(But in truth, I suspect that (a)-(c) are more likely!) ;)

Regards,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top