You are here: Re: use C constant in php « PHP Programming Language « IT news, forums, messages
Re: use C constant in php

Posted by Mladen Gogala on 11/18/99 11:44

On Fri, 07 Apr 2006 07:02:53 -0700, wong_powah wrote:

> I define some constants in C header file.
> e.g.
> const int MAX = 10;
>
> How do I use the same value of MAX in php without redefining MAX in
> php?
> i.e. it involve how php interact with functions and libraries written
> in other languages, such as C.

The statement

define('MAX',10);

would do the same thing. The "int" part is impossible, due to the weakly
typed nature of PHP. As for interacting with other languages, read the
manuals, they describe how to write an extension.

--
http://www.mgogala.com

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация