views:

683

answers:

5

We're trying to script a CAD program, and this is the example for controlling the date in our design slugs, but I don't even know what language it is to know what to do with it.

! LIBEDATE

def &d$ &ret$

set &d$ = rstr(`/`,` `,#d$);
set &ret$ = word(&d$,2),`/`,word(&d$,1),`/`,subs(word(&d$,3), -2, 2)
A: 

It might be AutoCAD Lisp

Robert
Lisp wouldn't have a `def` and `set` function would it? Also there isn't nearly enough parentheses..
Earlz
doesn't look like lisp to me, either.
Ken Liu
A: 

I thought it might be Tcl, but I don't any more... sorry (and thanks Johannes).

jah
Tcl doesn't use parentheses for command arguments. Neither has the `=` sign any relevance.
Joey
yes, definetly to many perlesque symbols to be vanilla TCL too - though technically you could probably write this DSL in TCL
jk
A: 

Would it be Python?

Gnought
Don't think so. Python `def`s are followed by colons and the ! LIBEDATE doesn't make sense, either.
Evgeny
@Evgeny I believe "LIBEDATE" is actually a comment. Google tells me it means "driving" in Estonian.
Anna Lear
+1  A: 

What CAD is it? Almost all the ancient CADs have their own (typically weird and ill-designed) scripting languages. Can it be one of the Tribon products?

SK-logic
A: 

Looks like it might be some kind of macro language maybe? Lua or similar.

Dennis