-
mattk
erlang undef cowboy
I am trying to run a custom application but get multiple errors. I believe the main egs app gets an error because it calls the egs patch app which has an undefined type. I cant figure out how to get this working I have tried recompiling the code many times in regards to others with a similar problem but nothing seems to work. The cowboy start listener remains undefined.This is the error I receive.=CRASH REPORT==== 10-Apr-2013::21:02:00 ===crasher:initial call: application_master:init/4pid: <0
-
KenB
c preprocessor define undef
So, to start off, here’s the code, with actual names switched for generic ones to limit confusion./* Get the list of Hotkey commands */ #define A_COMMANDS_MACRO(a, b, c, d) a = b , enum { #include “commandsFile.def” } ; #undef A_COMMANDS_MACROThis is a snippet from some source code I have been looking over and considering forking as a way to familiarize myself with the intricacies of the C programming language. So, to my untrained eye, this appears to do nothing. To my brain, defining something
-
chalmers
ruby undef
Possible Duplicate:undef – Why would you want to undefine a method in ruby? Can anyone lay out a practical use for undef in ruby? I’m coming from languages like javascript and python that don’t have it built in. You could of course simulate it in a language like javascript:var obj = { func:function(){alert(“works”)} } obj.func() // -> “works” delete(obj[“func”]) obj.func() //->obj.func() is not a functionbut I’ve never really had use for that. Are there some common situations where undef
-
iammilind
c++ c coding-style macros undef
In many of the C and C++ files I have seen macros like this:#ifdef X #undef X // no statements in between #endifI feel that, it’s adequate to simply write:#undef XIf the macro X wasn’t defined, then the #undef should have no effect.Is it ok to put standalone #undef, if I want to only undefine a macro ? Does that make the coding practice bad in anyway ?
-
Dennis Miller
doxygen undef
I currently have a couple of #define in c files that turn off some functionality to hardware for testing. However, I want to document them with doxygen when they are undefined as well.For example:This works fine:/// \def SIMULATE_SOME_HW_INTERFACE /// Define this when you want to simulate HW interface. #define SIMULATE_SOME_HW_INTERFACEWhen you change the #define to #undef, you get a warning in doxygen, and it doesn’t show up in the doxygen generated output. I want to document this #define wethe
-
templatetypedef
c++ visual-studio-2010 main undef
I’m working with MVisualC++ 2010 and when I try to undefine the “main”, there’s no result and the console launches as usual. I was expecting some missing entry point error or something. Why is that?#undef main int main() { }
-
brian d foy
perl undef
I have a fragment in this form:my $a = $some_href->{$code}{‘A’}; # a number or undef my $b = $some_href->{$code}{‘B’}; # a number or undef $a = 0 unless defined($a); $b = 0 unless defined($b); my $total = $a + $b;The reality is even more messy, since more than two variables are concerned.What I really want to write is this:my $total = $some_href->{$code}{‘A’} + $some_href->{$code}{‘B’};and have undef correctly evaluate to 0 but I get these warnings in almost every run:Use of uninitia
-
zigdon
perl warnings undef
How do you get Perl to stop and give a stack trace when you reference an undef value, rather than merely warning? It seems that use strict; isn’t sufficient for this purpose.
-
tunnuz
c++ undef
I’m working in C++ and I need to know if a scalar value (for instance a double) is “defined” or not. I also need to be able to “undef” it if needed:class Foo { public:double get_bar();private:double bar;void calculate_bar() {bar = something();} };double Foo::get_bar() {if ( undefined(bar) )calculate_bar();return bar; }Is it possible in C++?Thanks
-
brian d foy
perl printf undef
I’m looking for an elegant way to denote undefined values in situations where formatted numbers usually render. I’ll work up a small example. For starters, you of course can’t use this:#!/usr/bin/perl use strict; use warnings; for my $s (1, 1.2, undef, 1.3) {printf “%5.2f\n”, $s; }…because the ‘use warnings’ nails you with ‘Use of uninitialized value…’ on the third iteration. So the next step is something like this:#!/usr/bin/perl use strict; use warnings; for my $s (1, 1.2, undef, 1.3) {pri