1. Greetings!
- Posted by Ralph Hilton <rhilton at MAIL.INCONNECT.COM> Dec 30, 1997
- 766 views
Greetings, I've been a registered user of EU for sometime and up-till-now I have'nt done much with it. All that has changed as the creative bug has hit me and have decided to write an RPG BBS Door game in EU. I've been a 'lurker' on this list for about a year now. What has prompted me to start a project with EU is some of the messages about UNFINISHED projects and such. I decided it was about time for me to START a project <<G> and hopefully finish it. I used to program in a language called GFA-Basic, a language for the ATARI ST (680xx), it is procedure oriented similar to EU, but that was in the 80's and I really have'nt programmed AT ALL for the Intel chip. With the above in mind I will become your worst pest in the question department , forwarned is forarmed. <<G> Here is a snippet of code that I keep getting an error: invalid escape character File = "c:\euphoria\telenora\dorinfo1.def" ^ (I think the EU is interpreting the backslash as part of a 'token' like \n for a new line...) as soon as move dorinfo1.def into the BIN directory and change it to read like this: File = "dorinfo1.def" sequence Line, File, BBSUserInfo, UserAliasFirst, UserRealFirst, UserAliasLast, UserRealLast, PlayerBBSName, BBSName, Temp1, Temp2, ComPort -- Initialize Variables File = "c:\euphoria\telenora\dorinfo1.def" ... procedure GetDorinfo() -- Gets info from Dorinfo1.def & puts it in -- the sequence BBSUserInfo. FileNumber = open(File,"r") if FileNumber = -1 then puts(SCREEN,"**** Program Halted ****\nCould Not open " & File abort(1) else for x = 1 to 12 do Line = gets(FileNumber) BBSUserInfo = append(BBSUserInfo,Line) end for end if close(FileNumber) end procedure ------- Any help would be appreciated.... Ralph Beta Tester for Battlecruiser 3000ad By Derek Smart Cmdr. Major Havoc GCV: Hell's Heart "<bold><italic>If you don't stand for something.... You'll fall for anything...." Battlecruiser 3000ad Live Chat, No Special Soft- ware needed, just a Java-Enabled Web-Browser! http://www.inconnect.com/~rhilton/parachat.htm Battlecruiser Info Page & Patches http://www.inconnect.com/~rhilton/bc3k.htm ------------------------------------------------
2. Re: Greetings!
- Posted by Ralf Nieuwenhuijsen <nieuwen at XS4ALL.NL> Dec 30, 1997
- 774 views
- Last edited Dec 31, 1997
>I used to program in a language called GFA-Basic, a language for the ATARI ST (680xx), it is procedure oriented similar to EU, but that was in the 80's and I really have'nt programmed AT ALL for the Intel chip. You don't need to worry about the chip, Euphoria hides all that from you. What you want to know is the following: Euphoria preprocesses your code and then it makes an internal form out of it, when it is doing that, all the escape characters are replaced by real characters. An escape character in Euphoria starts like this: '\' and then has a some character behind it to tell him what character. Example : '\n' is equal to 13 Which makes the puts routine jump to the beginning of the next line (and scroll the screen if needed) But what when you actually want to say '\' as a character ? Well you use this escape character '\\' So your file should be: File = "c:\\euphoria\\telenora\\dorinfo1.def" Remember that this only goes for your code, when you prompt a user for a file name, he cannot use escape characters at all. They are there because for example a line feed with interfere with the linefeeds used to give your program some structure) For more information see the documentation (refman,doc), it has to be there somewhere.. Ralf