Question: The Challenge
-------------

Write a program that outputs `Hello World, from line X!`, where `X` is the line number, in the source code, of the actual print statement itself.

The Rules
---------

* In this context, we want **the *first* line number of the statement which outputs the string** to be displayed to `stdout`
* You should **avoid simply searching through your source code as a string** (either file or quine) to find the line number
* If any **additional whitespace or statements** (which do not interrupt the flow of the code) is added to the source code, it should be **reflected at run-time** (after compiling if applicable)

Recommendations
---------------

If provided by the language, you **may** use exceptions/stack traces to accomplish this goal. Try your best to use code that is **portable** across different systems/implementations, but note that this is **not** a requirement. Using defined variables like `__LINE__`, although allowed by the rules, are discouraged.

The Winner
----------

* This is a **popularity contest** (ended on June 10, 2014), where the **answer voted highest by the community** will be declared the winner based on the current votes at the time
* When voting, please consider the creativity of someone's answer, how elaborate or **interesting** it is. and the difficulties/constraints of the programming language being used

Answer: 
C or C++, and AWK
=================

lineno.c:

```
// code or comments
// ....
#error Hello World, from line
// other code or comments

```

Usage:

```
gcc lineno.c 2>&1 | awk '{ split($0,a,":"); ; printf("%s %s!\n", gensub(".*#error ","",1), a[2]); exit; }'

```

Output:

Hello, World, from line 3

Notes:

* No user written code searches the file.
* g++ will work on a c++ file.
Powershell
==========

```
$l=(Get-PSCallStack | ForEach{$_.Location})[0].split(' ')[-1]; "Hello World, from line $l!"

```

And:

```
try{ I AM ERROR. } catch { $l=$error[0].InvocationInfo.ScriptLineNumber; "Hello World, from line $l!" }

```

Both work like this:

```
PS C:\MyFolder> .\helloworld.ps1
Hello World, from line 1!

```