4D SYSTEMS FORUM

Register New Posts
 
 
 


Reply
 
Author Comment
 
pgerlach

Registered: 26/05/12
Posts: 19
Reply with quote  #1 
Hi,

I don't know if it is a bug, but while mistyping some code, I ran around this "bug", if it is one.
I used an array as a function

Code:
var array[1];array[0] = "stuff";pustr(array[0]); // normalpustr(array(0)); // mistyping I did

The device crashed. Well that does not surprise me, but I had no warning from the compiler. So I'm wondering if it is a "bug" of the compiler, or if there is some way this code could do something useful. 

I attached a file to easily reproduce the stuff.

Thanks

 
Attached Files:
4dg array_as_function.4dg (393 Bytes, 8 views)

__________________
pierre

ESPsupport

Moderator
Registered: 27/01/09
Posts: 4,277
Reply with quote  #2 

Thanks for that.

 

The compiler isn't the best in the world at detecting 'odd' syntax.

 

As you surmised the compiler would be calling array with a parameter of 0.

Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Powered by Website Toolbox - Create a Website Forum Hosting, Guestbook Hosting, or Website Chat Room for your website.