Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Pic.FileNew
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
klutzedufus




PostPosted: Mon Sep 12, 2011 9:54 pm   Post subject: Pic.FileNew

What is it you are trying to achieve?
I am trying to get the Pic.FileNew function to work


What is the problem you are having?
the Pic.FileNew function is not working


Describe what you have tried to solve this problem
I have looked in the Turing reference, and the example program is not functioning properly

When I run the example program (below), it comes up saying "Illegal picture ID number '0'. (Probable cause: picture was not successfully created.)"
Turing:


% The "Pic.FileNew" program.
var picID : int
var x, y : int

picID := Pic.FileNew ("%oot/Support/Help/Examples/Data Files/lighthouse.jpg")
for i : 1 .. 10
    x := Rand.Int (0, maxx)             % Random x
    y := Rand.Int (0, maxy)             % Random y
    Pic.Draw (picID, x, y, picCopy)
end for
Pic.Free (picID)



Please specify what version of Turing you are using
4.1.1
Sponsor
Sponsor
Sponsor
sponsor
Zren




PostPosted: Mon Sep 12, 2011 11:16 pm   Post subject: RE:Pic.FileNew

Is there a file at the location:
Turing:

var path := "%oot/Support/Help/Examples/Data Files/lighthouse.jpg"
put File.FullPath (path)
put File.Exists (path)
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: