LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 06-19-2005, 11:32 AM   #1
rsheridan6
Member
 
Registered: Mar 2003
Location: Kansas City
Distribution: Debian unstable
Posts: 57

Rep: Reputation: 21
Language agnostic configuration tools?


I'm starting out at web development and I've written some CGI scripts, html, javascript, and css. They all refer to variables in each other, and I'd like to keep them all in tune. If I were writing in just one language (which is all I've ever done before), I could do something like:

#define MYCONSTANT 1

But that obviously won't work across 4 or more files written in 4 or more languages. Any suggestions?
 
Old 06-19-2005, 12:46 PM   #2
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: ubuntu
Posts: 2,530

Rep: Reputation: 108Reputation: 108
If you use PHP instead of CGI, you could define constants (macro's) to use in all of: PHP, html, javascript and, with a bit of fiddling, also CSS.

You would write this instead though:
Code:
define('MYCONSTANT', 1);
 
Old 06-19-2005, 12:51 PM   #3
jonaskoelker
Senior Member
 
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 46
I would suggest looking at a generic macro (pre-)processor, such as GNU m4.
 
Old 06-19-2005, 06:45 PM   #4
rsheridan6
Member
 
Registered: Mar 2003
Location: Kansas City
Distribution: Debian unstable
Posts: 57

Original Poster
Rep: Reputation: 21
Thanks, M4 looks like what I'm looking for.
 
Old 06-19-2005, 11:46 PM   #5
jonaskoelker
Senior Member
 
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 46
Quote:
Thanks ...
I'm glad I could help

--Jonas
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
localisation/language translation tools sailu_mvn Linux - Software 0 07-28-2005 11:31 PM
Debian Configuration tools thom Debian 6 06-17-2004 12:42 PM
X configuration tools bigearsbilly Debian 3 03-09-2004 08:52 AM
Language configuration problem satimis Red Hat 0 09-25-2003 08:14 PM
to change the language configuration eye Linux - Software 1 08-31-2003 01:09 AM


All times are GMT -5. The time now is 03:25 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration