EZB Connection icon EZB Connection Connects EZ-B I/O controllers to ARC via COM or IP (5 connections). Supports init scripts, battery monitoring, TCP/EZ-Script server and serial/I2C. Try it →
USA
Asked — Edited
Resolved Resolved by DJ Sures!

Filereadall Stops Working

Tested with the last version and the previous version

The following code:


1: ClearVariables()
2: $test1 = FileReadAll("c:\dev\test.txt")
3: FileReadClose("c:\dev\test.txt")
4: Print(Length($test1))

Generates an error:

Quote:

Error on line 4: Missing String Quotes or Invalid Expression at index 0: "hello

the "hello" is inside the file, not in the code.


ARC Pro

Upgrade to ARC Pro

Synthiam ARC Pro is a new tool that will help unleash your creativity with programming robots in just seconds!

Author Avatar
PRO
USA
#9  

if the content of the file has a "(" the error is:

Quote:

Error on line 4: Missing ) in Expression

I didn't check other combinations but if there is a RegEx involved,

i'm not a fan of regular expressions, although they are very useful.

Author Avatar
PRO
Synthiam
LinkedIn Thingiverse Twitter YouTube GitHub
#10  

oh - reading from a file - yeah. i will have to add a new function. A while ago there was a request to read code from a file with functions. This was implemented a long time ago but a function that reads which doesn't execute the function can be created.

I'll have to create a second version of file commands for that.