Questions tagged [undef]

EXAMPLES:

undef $foo;
my $bar = undef;

SEE ALSO:
perldoc -f undef

57 questions
1
vote
4 answers

c# Quick way to undef all parameters

I have a C# winform app which is doing a lot of calculation. there is a "run" button to trigger the process. I would like to be able to "re-trigger or re-run or re-submit" the information without having to restart the program. Problem is I have a…
John Ryann
  • 2,283
  • 11
  • 43
  • 60
1
vote
1 answer

How do I remove this UndefVar error in my code?

I'm using this notebook provided by the Computational Thinking course and am running into an error when I execute this code. import Pkg Pkg.add(["Images", "ImageIO", "ImageMagick"]) using Images philip_file =…
whyharsha
  • 87
  • 6
1
vote
2 answers

How do I make the STDIN in the Array stop? (PERL)

My @array will not stop taking in STDIN... my @array = undef; while (@array = undef){ @array = ; for (@array[x]=5){ @array = defined; } }
Soup
  • 45
  • 5
1
vote
1 answer

Seeming evaluation of preprocessor code inside a #if false block

I'm working in C# via MonoDevelop 4.0.1 (Current version for Unity), and have hit a seeming language weirdness. Here's my entire .cs file: #if false #define foo #endif class myClass { int member; } #if false #error this error does not…
orion elenzil
  • 4,484
  • 3
  • 37
  • 49
1
vote
2 answers

Is it really necessary to explicitly define "undefine" even when the define is commented out?

I was having some problems with this code executing: #if TRACE dbgLog = new LogInfo( "PlatypusCE" ); #endif This was occurring even though "TRACE" was commented out above, right after a large block of general comments: //#define…
B. Clay Shannon-B. Crow Raven
  • 8,547
  • 144
  • 472
  • 862
1
vote
1 answer

undef value and printing it

This is my first time using Perl. In Perl threads, the return value of the threads->exit() subroutine is undef value if the context is scalar. #!/usr/bin/perl use threads; $t=threads->create({"context"=>"scalar"}, sub {…
Mahmoud Emam
  • 1,499
  • 4
  • 20
  • 37
1
vote
3 answers

How can I gracefully iterate over a key - value hash generated from JSON containing values set to 'undef' and 'null'?

I am pulling a third party's json response and sometimes the values of the fields are literally 'undef' or 'null'. If I try to do a print of the key and value of each object in this json, whenever there is a undef value it will throw an…
user2407720
0
votes
1 answer

Loop through headers in C preprocessor

Is there a way to loop through all the included/defined header files and then #undef them all? If looping is the issue, is there another way to #undef all of them with ease?
tekknolagi
  • 10,663
  • 24
  • 75
  • 119
0
votes
2 answers

How to overwrite a macro definition using compiler options

I want to redefine a macro, without modifying the header or source files. For example: #define macro_1 Present -- Is what actually defined in the header file For one set of execution I need this macro to be same as it is , but for another set of…
krupa n
  • 1
  • 2
0
votes
1 answer

weird behavior of #undef

#include #define MY_CONST 10 #define MY_OTHER_CONST MY_CONST #undef MY_CONST int main() { enum my_enum : int { MY_CONST = 100 }; std::cout << MY_OTHER_CONST; return 0; } I would expect 10 as an output, but this…
user3600124
  • 829
  • 1
  • 7
  • 19
0
votes
1 answer

Why is #undef not working for my function?

I defined something at the beginning: #define noprint Then I returned in my functions if it's defined: void print() { #ifdef noprint return; #else //do stuff #endif } Then in the main function: main() { #undef…
user15114051
0
votes
1 answer

Can #undef affect member functions in C++?

I have an Unreal Engine 4 project with several plugins. On of these plugins contains a FileHelper class with a method CreateFile. This has worked fine for months, but in a recent commit, a different plugin added a call to FileHelper::CreateFile and…
Tare
  • 482
  • 1
  • 9
  • 25
0
votes
2 answers

perl out of memory message processing just 64 XML file each of 2MB - unix

I tried globalising variables and undef , increasing data segment space in unix , localising variable , but still getting the same error. I need to process around 750 files .Can anyone help? Thanks. I know reading the entire file into string may be…
Dexters
  • 2,419
  • 6
  • 37
  • 57
0
votes
2 answers

How to check for an undef value in a Matrix (in Julia) and assign a new value?

I want to create a matrix A of undefined values and have the following code that works just fine. A = Matrix{Tuple{Float64, Array{Int64, 1}}}(undef, 100, 100) Later, I want to check if a particular cell is undefined and if so, assign a value after…
whyharsha
  • 87
  • 6
0
votes
1 answer

How should an undef error be interpreted in Erlang?

I am trying to make sense of the following error: 4> c(sv). {ok,sv} 5> B=sv:start(). <0.93.0> 6> =ERROR REPORT==== 14-Jul-2020::21:44:13.256000 === Error in process <0.93.0> with exit value: {undef,[{common,createProcess, …
Bercovici Adrian
  • 8,794
  • 17
  • 73
  • 152