4 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello there,
I'd like to define a variable b equal to 0.5/a where a=0.001, so I wrote something like that:
a=0.001;
let 'b=0.5/$a';
but it doesn't work... maybe because the variable a has a real value???
Any help will be appreciated!!!:D (1 Reply)
Discussion started by: Giordano Bruno
1 Replies
2. Programming
This might be a silly question, but I thought I'd ask anyway. If I'm writing in C, isn't it more efficient to, for instance, use constant character variable set to 'A' instead of hard-coding a character 'A'? Since it's only a single character instead of a string, it might not matter much. (10 Replies)
Discussion started by: cleopard
10 Replies
3. Shell Programming and Scripting
is it possible to use eval to create constants in perl? i cannot seem to get anything to work, and my searches are turning up little to nothing. an example of what i am trying to do is this:
2 arrays:
array 1: 'FOOD','NUMBER','OS'
array 2: 'pizza','two','unix'
loop through the arrays and... (5 Replies)
Discussion started by: effigy
5 Replies
4. Programming
Hi all
My question is related to following sample code which tries to change consant value by pointers.(I know it is wrong practice but i am surprised by mis-behaviour)
The code:
#include <stdio.h>
int main()
{
const int x = 10;
int *y;
const int * const z = &x;
y = (int *)&x;... (2 Replies)
Discussion started by: Shobhit
2 Replies
LEARN ABOUT CENTOS
package::constants
Package::Constants(3pm) Perl Programmers Reference Guide Package::Constants(3pm)
NAME
Package::Constants - List all constants declared in a package
SYNOPSIS
use Package::Constants;
### list the names of all constants in a given package;
@const = Package::Constants->list( __PACKAGE__ );
@const = Package::Constants->list( 'main' );
### enable debugging output
$Package::Constants::DEBUG = 1;
DESCRIPTION
"Package::Constants" lists all the constants defined in a certain package. This can be useful for, among others, setting up an
autogenerated "@EXPORT/@EXPORT_OK" for a Constants.pm file.
CLASS METHODS
@const = Package::Constants->list( PACKAGE_NAME );
Lists the names of all the constants defined in the provided package.
GLOBAL VARIABLES
$Package::Constants::DEBUG
When set to true, prints out debug information to STDERR about the package it is inspecting. Helps to identify issues when the results are
not as you expect.
Defaults to false.
BUG REPORTS
Please report bugs or other issues to <bug-package-constants@rt.cpan.org<gt>.
AUTHOR
This module by Jos Boumans <kane@cpan.org>.
COPYRIGHT
This library is free software; you may redistribute and/or modify it under the same terms as Perl itself.
perl v5.16.3 2013-02-26 Package::Constants(3pm)