I like simple examples for purposes of learning a programming language.  Something that does not clutter everything up leaving me with a million doubts.  The following Eagle ULP tutorial file writes an ASCII string to two different files.  The first file write demonstrate the default location of file writing and the second shows how to specify where you want the file written.  Notice the backslash character needs escaped because it is the escape character!  

 


output("fudge.txt", "wt"){ printf("Directly printed to file with output statement\n");}           //w= Write new file / t= Text mode
                                                                                                  //This did not work when located at bottom of file. Must not have been executed.  
                                                                                                  //It writes to the Eagle program directory! 
output("C:\\Users\\freemonsandlewould\\Documents\\Schematics\\Reader\\ULP\\farge.txt", "wt")
      { printf("Directly printed to file with output statement\n");}          
                                                                                                  //The backslash character must be escaped with another backslash
                                                                                                  //When you specify the entire path then it goes where you plan that it should
      
exit (0);   // Must have this or it errors out


 

Categories: Eagle PCBElectronics

1 Comment

AMAR MonsterID Icon AMAR · May 26, 2014 at 1:06 am

Hi

how to converts an nteger to a string caracter?

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *