ARM Technical Support Knowledge Articles

DECLARING EXTERNAL SBITS

Applies to: C51 C Compiler

Answer


Information in this article applies to:


SYMPTOMS

I have declared an sbit called foo in a source file called bar.c. In another source file, I have tried to declare the sbit as extern:

extern sbit foo;

However, when compiling I get a syntax error. What am I doing wrong?

RESOLUTION

When declaring an sbit as extern, you must use the 'bit' type. For example:

extern bit foo;

MORE INFORMATION

Article last edited on: 2006-10-16 11:56:42

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential