URL Address - page 3

 
Fernando Carreiro #:

That was the code that redefines an internal reserved function with infinite recursion. It is "bad" code that needs to be fixed.

So, show the new fixed code that properly addresses the issues pointed out.

  1. Don't create infinite recursion.
  2. Don't redefine the internal function.

You also stated that your original code did not do that, so why have you not shown that original code instead?

If you want help with the code, then you need to be more forthcoming. We cannot read your mind nor see your computer.

The original as in the documentation did not do anything to request.  The url i figured was a timeout issue but then it has just become an infinite loop of requesting.

 
Thomas Bradley Butler #:
This is the part that is causing it

I will state this only one more time and if you don't correct it, I will stop trying to help.

You are redefining an internal reserved function and creating an infinite recursion.

If you understand what that means, then, ...

  1. Don't create infinite recursion.
  2. Don't redefine the internal function.

If you don't understand what that means, then just be humble enough to state that you don't understand what that means.

 
Fernando Carreiro #:

That was the code that redefines an internal reserved function with infinite recursion. It is "bad" code that needs to be fixed.

So, show the new fixed code that properly addresses the issues pointed out.

  1. Don't create infinite recursion.
  2. Don't redefine the internal function.

You also stated that your original code did not do that, so why have you not shown that original code instead?

If you want help with the code, then you need to be more forthcoming. We cannot read your mind nor see your computer.

how it looks


The errors from the web request code that I posted.

 
Fernando Carreiro #:

I will state this only one more time and if you don't correct it, I will stop trying to help.

You are redefining an internal reserved function and creating an infinite recursion.

If you understand what that means, then, ...

  1. Don't create infinite recursion.
  2. Don't redefine the internal function.

If you don't understand what that means, then just be humble enough to state that you don't understand what that means.

Well if I knew than I would not be here.  I understand it as a infinite loop is being created as I already said that

 
Thomas Bradley Butler #: Well if I knew than I would not be here.  I understand it as a infinite loop is being created as I already said that


1. Don't redefine internal functions.

That means don't create any function with the same name as an internal one, especially not with the same parameters.

So, don't create any function with the name "WebRequest". Give it some other name.

2. Don't create infinite recursion.

In other words, in a function's implementation, don't call the function itself.

Recursion has its use, but only in very specialised cases and with well defined depth.

It should be avoided at al costs if you are unaware of how to use it properly.

Do you understand these two points?

If yes, then rewrite the code you presented with these fixed, and show it again.

 
Thomas Bradley Butler #: The errors from the web request code that I posted.

Your log output mentions a function called "MyWebRequest", yet that is not what you have shown us with your sample code.

What you showed us was a redefinition of "WebRequest" calling itself.

That is why it is paramount that you always show your "proper" code, exactly as you have used it.

 
Fernando Carreiro #:


1. Don't redefine internal functions.

That means don't create any function with the same name as an internal one, especially not with the same parameters.

So, don't create any function with the name "WebRequest". Give it some other name.

2. Don't create infinite recursion.

In other words, in a function's implementation, don't call the function itself.

Recursion has its use, but only in very specialised cases and with well defined depth.

It should be avoided at al costs if you are unaware of how to use it properly.

Do you understand these two points?

If yes, then rewrite the code you presented with these fixed, and show it again.

It think that is the issue.    redefine internal functions.  But like I said, originally I use the default documentation Web Request and it had no effect, saved no functionality

 
Thomas Bradley Butler #: It think that is the issue. redefine internal functions.  But like I said, originally I use the default documentation Web Request and it had no effect, saved no functionality

I have already asked you to show that original code but you refused. So, I give up!

 
Fernando Carreiro #:

I have already asked you to show that original code but you refused. So, I give up!

No the original function is what I mean.  You said use the documentation and I stated that I did and it had not effect

 
Thomas Bradley Butler #:

No the original function is what I mean.  You said use the documentation and I stated that I did and it had not effect

the definition of recursion of of Wikipedia:

A classic example of recursion is the definition of the factorial function, given here in Python code:

def factorial(n):
    if n > 0:
        return n * factorial(n - 1)
    else:
        return 1

The function calls itself recursively on a smaller version of the input (n - 1) and multiplies the result of the recursive call by n , until reaching the base case, analogously to the mathematical definition of factorial.

Recursion in computer programming is exemplified when a function is defined in terms of simpler, often smaller versions of itself. The solution to the problem is then devised by combining the solutions obtained from the simpler versions of the problem. One example application of recursion is in parsers for programming languages. The great advantage of recursion is that an infinite set of possible sentences, designs or other data can be defined, parsed or produced by a finite computer program.


Also take a look at the Ackerman-Function here:

https://en.wikipedia.org/wiki/Ackermann_function


Understanding the implications of a function calling itself is mandatory, if you are using such.


Your WebRequest function keeps calling itself, because you named them the same. The compiler cannot distinguish between your WebRequest and the original WebRequest.

Because you named them the same, and have given them the same parameters list.


Reason: