![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Questions & Help Needed Post any question regarding Basic4ppc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi,
I am using the supplied sample for HTTP I have a problem with the following line of code in V6.01: FileOpen(c1,UploadFile,cRandom) This builds OK and compiles OK with Optimisation off. With Optimising ON however, I get an error: Index was out of Range. Must be non-negative an less than the size of the collection. Parameter name:Index This line of code is from the HTTP Sample and compiles - runs fine in V5.x Any thoughts greatly appreciated. Best Wishes Tony Hunt |
|
||||
|
Hi TonyGprs,
the real problem is located in the line before because the Byte array must be declared as a global variable: HTTP upload sample specci48 |
|
|||
|
Hi,
Thanks for the quick response. While collecting the code to post, I have found the problem. The original code in the sample is. Sub UploadFile (UploadFile, URL) 'Requires a server with write permission. NOTE.. The Sub name is the SAME as the first parameter IE:UploadFile So when the code FileOpen(c1,UploadFile,cRandom) is compiled USING THE OPTIMISER IN V6.01, it looks as though it's passing the sub UploadFile as a parameter to the function FileOpen() Change this to.. Sub UploadFile (LocalFile, URL) 'Requires a server with write permission. then.. FileOpen(c1,LocalFile,cRandom) This Now Optimises and runs fine.. It's obviously the result of the less forgiving new compiler.. That can only be a good thing. Best wishes for your excellent product.. Tony Hunt http://www.gprsdatasystems.com Last edited by TonyGprs : 01-27-2008 at 12:32 PM. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Compile error | Ricky D | Questions & Help Needed | 2 | 09-08-2008 01:21 PM |
| error compile | manu | Beta Versions | 6 | 08-28-2008 10:14 PM |
| var_ags compile error | agraham | Beta Versions | 1 | 08-28-2008 01:43 PM |
| Inconsistent compile error | agraham | Beta Versions | 1 | 08-27-2008 06:34 PM |
| Compile error | enonod | Questions & Help Needed | 5 | 05-29-2008 12:38 PM |