1. Say hello to the official release of PikX v1.0!

Here it is:
pikx.ex:
--PikX.ex by Matt Z Nunyabidness(a.k.a Anonymous)
include wildcard.e
include get.e
include graphics.e
include user.e
include image.e
object cl,fname,action,vc,lines
sequence pic
integer fn
cl=command_line()
if length(cl)<4 then
   puts(1,"PikX v1.0")
   puts(1,"\nSyntax: ex PikX action filename")
   puts(1,"\naction can be load or save")
   puts(1,"\nfilename is the file to read from or write to")
   abort(0)
end if
action=cl[3]
fname=cl[4]
vc=video_config()
action=upper(action)
if not compare(action,"SAVE") then
   pic=save_text_image({1,1},{vc[3],vc[4]})
   puts(1,"\nAttempting to save to "&fname&"...")
   fn=open(trim(fname),"w")
   if fn=-1 then
      puts(1,"\nThere was an error opening "&fname)
      puts(1,"\nWhat might have occured is an access denied error")
      abort(1)
   end if
   print(fn,pic)
   close(fn)
   abort(0)
elsif not compare(action,"LOAD") then
   puts(1,"Attempting to read from "&fname&"...")
   fn=open(fname,"r")
   if fn=-1 then
      puts(1,"\nThere was an error loading "&fname)
      puts(1,"\nWhat might have occured is a file not found")
      puts(1,"\nPlease check your typing and try again")
      abort(2)
    end if
   pic=get(fn)
      if pic[1]=GET_EOF then
         puts(1,"Reached the end of "&fname&" too soon.")
         abort(3)
      elsif pic[1]=GET_FAIL then
         puts(1,fname&" does not contain a valid image.")
         abort(4)
      end if
   close(fn)
   clear_screen()
   display_text_image({1,1},pic[2])
   if wait_key() then
   end if
   vc=video_config()
   lines=vc[3]
   position(lines-1,1)
   abort(0)
end if
puts(1,"\n"&action&": This is not a supported action")


-------------------------------------
When it comes to programming languages, Euphoria is a cut above -
matt1278 at juno.com and matt1421 at juno.com(and soon to be
irisnmatt at prodigy.net. Then again, maybe not) Euphoria programmer

new topic     » topic index » view message » categorize

2. Re: Say hello to the official release of PikX v1.0!

how come the words foobar, bar, foo, and foo.bar haunt me!!!!!!!!!! help!

-------------------------------------
When it comes to programming languages, Euphoria is a cut above -
matt1278 at juno.com and matt1421 at juno.com(and soon to be
irisnmatt at prodigy.net. Then again, maybe not) Euphoria programmer

_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu