| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#11
| |||
| |||
| Saluton! On Sun, 6 Apr 2008 22:06:23 -0700 (PDT), "O. Olson" wrote: > I have in the DEF File > FROM FIO IMPORT Create, Open, File, Close, WrStr, WrLn, WrLngCard, > WrCard; > And in the MOD file simply > IMPORT IO; > There is no where in the MOD File where it explicitly says IMPORT File > - like it does in the DEF. > This may explain why I might be getting an error in functions that > use" File" . While all the functions that give the error of not > matching the previous declaration have "File" as one of the parameters > - there are a few functions that use "File" - but yet do not give the > error. Hm, if the .mod has ,,IMPORT IO'', shouldn't the usage be ,,IO.File'' instead of merely ,,File''? Ad Astra! JuL -- jynwyn@gmx.de / Work like you don't need the money Jürgen ,,JuL'' Lerch / Dance like no one was watching / Love like you've never been hurt / - ? |
|
#12
| |||
| |||
| > I have in the DEF File > > FROM FIO IMPORT Create, Open, File, Close, WrStr, WrLn, WrLngCard, > * * * * * * * * WrCard; > > And in the MOD file simply > > IMPORT IO; > > There is no where in the MOD File where it explicitly says IMPORT File > - like it does in the DEF. I think you got it .... With XDS and ISO compilers you need the very same 'File' IMPORT clause in the MOD And yes Martin message points something very important. JPRR |
|
#13
| |||
| |||
| On 2008-04-07, JP2R <jp.dezaire@orange.fr> wrote: >> I have in the DEF File >> >> FROM FIO IMPORT Create, Open, File, Close, WrStr, WrLn, WrLngCard, >> * * * * * * * * WrCard; >> >> And in the MOD file simply >> >> IMPORT IO; >> >> There is no where in the MOD File where it explicitly says IMPORT File >> - like it does in the DEF. > > > I think you got it .... > With XDS and ISO compilers you need the very same 'File' IMPORT clause > in the MOD > And yes Martin message points something very important. No. Import xx; imports qualified only? It would have to read FROM IO IMPORT File; to cause problems. |
|
#14
| |||
| |||
| On Apr 7, 12:37 pm, Marco van de Voort <mar...@stack.nl> wrote: > On 2008-04-07, JP2R <jp.deza...@orange.fr> wrote: > > > > >> I have in the DEF File > > >> FROM FIO IMPORT Create, Open, File, Close, WrStr, WrLn, WrLngCard, > >> WrCard; > > >> And in the MOD file simply > > >> IMPORT IO; > > >> There is no where in the MOD File where it explicitly says IMPORT File > >> - like it does in the DEF. > > > I think you got it .... > > With XDS and ISO compilers you need the very same 'File' IMPORT clause > > in the MOD > > And yes Martin message points something very important. > > No. Import xx; imports qualified only? > > It would have to read > > FROM IO IMPORT File; > > to cause problems. IMPORT xx imports QUALIFIED idents only FROM xx IMPORT yy imports yy UNQUALIFIED AND imports made in DEF is NOT known in MOD and you get an error with XDS compiler BUT with Topspeed this will compile ... DEFINITION MODULE x; FROM FIO IMPORT WrLn, File; PROCEDURE Y (f: File); END x. ------------------ IMPLEMENTATION MODULE x PROCEDURE Y (f: File); BEGIN WrLn(f) END Y; END x. |
|
#15
| |||
| |||
| On 2008-04-07, JP2R <jp.dezaire@orange.fr> wrote: >> No. Import xx; imports qualified only? >> >> It would have to read >> >> FROM IO IMPORT File; >> >> to cause problems. > > IMPORT xx imports QUALIFIED idents only > FROM xx IMPORT yy imports yy UNQUALIFIED > AND imports made in DEF is NOT known in MOD and you get an error with > XDS compiler Huh? Is that conforming to the standard? |
|
#16
| |||
| |||
| On Apr 7, 9:17 pm, Marco van de Voort <mar...@stack.nl> wrote: > On 2008-04-07, JP2R <jp.deza...@orange.fr> wrote: > > >> No. Import xx; imports qualified only? > > >> It would have to read > > >> FROM IO IMPORT File; > > >> to cause problems. > > > IMPORT xx imports QUALIFIED idents only > > FROM xx IMPORT yy imports yy UNQUALIFIED > > AND imports made in DEF is NOT known in MOD and you get an error with > > XDS compiler > > Huh? Is that conforming to the standard? Well I never read directly ISO standards texts (far too expensive), but from documents I could read I think that it's Topspeed that is NOT standard (and far from) - anyway at this time there was not yet a standard, apart the de facto topspeed one in the PC/MSDOS world. XDS has a good documentation of ISO language on his site - and as I understand it each ident must be introduced in the module scope either by a definition, a declaration or an IMPORT ... and a DEF module is distinct of the matching implementation. |
|
#17
| |||
| |||
| Thanks to all of you for posting. I think I managed to figure this out by copying the Import statement from the DEF File to the MOD File. Now the error goes away - but my file still has other errors to deal with - so I am not entirely sure if this worked or not. Thanks again. O.O. |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.