Group Abstract Group Abstract

Message Boards Message Boards

0
|
2.1K Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Syntax error: ... more input needed

I wanted to demonstrate that linear regressions are not just for finding straights lines that fit a set of points but also is more general. For this I wrote, in part, this trivial function:

randomRow[] := Module[{x, col}, 
   x = RandomReal[1];
   col = {1.0, x, x^2, x^3, x^4};
   col];

I got the syntax error that more input was needed. When I deleted and reentered the col = {} line, the error disappeared. Apparently, I must have entered some unprintable characters which caused the error.

Is there a way to show these "illegal" characters in the notebook so I can fix the problem without resorting to retyping an entire notebook?

POSTED BY: Lawrence Winkler
2 Replies

This has happened to me before. I published a package some time ago, and have not been able to update it, after making some additions and cleaning up some code. I went to a lot of effort trying to find that unprintable character or characters.

I was happy to see this error appear again here in a way I could prove to myself that I was able to fat-finger code entry on my Mac in a tiny isolated piece of code. On hindsight, I should have preserved the flawed notebook before changing the few lines to find the fat-fingered line itself.

POSTED BY: Lawrence Winkler
Posted 1 year ago
POSTED BY: Eric Rimbey
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard