English Amiga Board


Go Back   English Amiga Board > Coders > Coders. System > Coders. Scripting

 
 
Thread Tools
Old 12 January 2019, 21:35   #21
solarmon
Registered User
 
solarmon's Avatar
 
Join Date: Dec 2018
Location: UK
Posts: 1,715
Quote:
Originally Posted by daxb View Post
In datatypes.library.doc you can read this:
So the returned number 14 is a DOS error code, not a ARexx error code. But I don't know what 14 is. At least there is something with this line: type = ExamineDT( fname,,VAR ). Try if other files (8svx. ilbm, ...) trigger the same error. If datatypes.library is buggy and you really need to determine file types you can use rexxtricks.library. It has functions that should do the same using whatis.library or FileID.library.
According to this:

https://wiki.amigaos.net/wiki/AmigaO...Error_Messages

it is:

Quote:
An attempt was made to open a function library included in the Library List, but the library could not be opened. Check that the correct name and version of the library were specified when the library was added to the resource list.
solarmon is offline  
Old 12 January 2019, 21:58   #22
solarmon
Registered User
 
solarmon's Avatar
 
Join Date: Dec 2018
Location: UK
Posts: 1,715
Thanks. That actually helped after I thought about it!

As I said, I'm was trying this on a minimal setup - so I didn't have the DEVataTypes folder (and its contents).

I added it, but it wasn't still working.

But, after you run the AddDataTypes command, it actually started working!

This seems to be the case for every reboot - so I assume this is usually added to the startup-sequence?

UPDATE: Yes - I see it in the ClassicWB LITE startup-sequence.
solarmon is offline  
Old 13 January 2019, 17:41   #23
daxb
Registered User
 
Join Date: Oct 2009
Location: Germany
Posts: 3,303
Quote:
Originally Posted by solarmon View Post
ARexx error codes are not DOS error codes! The error code 14 is interpreted by ARexx, hence it throws an ARexx error code/transation. What is false.

However, why do you need that special datatype.library? For a basic ARexx environment it is not needed.
daxb is offline  
Old 13 January 2019, 17:54   #24
solarmon
Registered User
 
solarmon's Avatar
 
Join Date: Dec 2018
Location: UK
Posts: 1,715
Quote:
Originally Posted by daxb View Post
However, why do you need that special datatype.library? For a basic ARexx environment it is not needed.
Because I'm an idiot! I actually don't need it.

That was an error on my part. I was searching for a function to get the 'basename' of a filename and found examinedt() and saw that it had a 'basename' stem.

I remember wondering at the time why the datatypes library had this, but I was blinkered and kept going.

I eventually realised my mistake, but I put this down, as always, to a good learning excercise...

I eventually figured out that I could use a combination of the LEFT() and LASTPOS() functions to get what I want:

basename = LEFT(filename,LASTPOS(".",filename)-1)
solarmon is offline  
Old 13 January 2019, 18:39   #25
daxb
Registered User
 
Join Date: Oct 2009
Location: Germany
Posts: 3,303
I don't know if I have mentioned it already but a good source for how doing stuff with ARexx is ARexxGuide: http://aminet.net/search?query=arexxguide
daxb is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Minimal startup-sequence for Tinylauncher? emuola Amiga scene 13 03 January 2018 14:21
C - minimal setup code for drawing graphics attle Coders. C/C++ 3 06 February 2017 22:07
Minimal config for multiview jotd support.Apps 17 14 March 2016 22:38
68000 minimal list of opcodes to know kamelito Coders. Asm / Hardware 8 28 January 2014 21:43
A minimal request jobro Amiga scene 3 29 December 2005 03:24

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 18:39.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.11050 seconds with 16 queries