is this some c code ?

C

chris

I have to retreive data from a old DOS program written in 1995 but I don't
recognize the
language -- Here's a sample of the code used in the .lib files -- Can anyone
tell me what language it is ? Thanks in advance. Here's the code sample :


if cmpy=0 cmpy+
selsuc{}
usestk{ii,is,"inf\rech"}
sucrec=ide.sucrec
if partiel=2
mn=record(numrec) complex=0
do LoadOpt,PrepTables
name_:c20=""+ppn(pnt(oo))
flush(0)
if exist(trim(name_)+".001") kill(trim(name_)+".001")
top(oo)
index(oo,1,1)
if categnb=0 & (rst<>0)
partiel=0 type4=1 do Type2b
else
if bycode { do Process_ else do Type3a }
endif
* if categnb=0 & (rst<>0) { partiel=0 type4=1 do Type2b else do Type3a }
* if mn.suivant=0 delete(mn)
lg:n3=1 seldes=""
for xy=1 to 15
trouve=0
if categ(xy)<>"" { selcateg=mid(selcateg,1,lg)+categ(xy) trouve=1 }
if des(xy)<>"" { seldes=mid(seldes,1,lg)+des(xy) trouve=1 }
if trouve lg=lg+15
next
pass(0,selcateg,seldes,numrec)
return
endif
if kqte=2
maxcmpynum=0 totsuc=0
maxnum=maxcmpynum top(suc)
while eof(suc)=0
if suc.inactif=0
totsuc+
v=recno(suc) sucnum(totsuc)=suc.numero
* x=suc.numero if x>maxnum maxnum=x
* x=recno(suc) if x>maxnum maxnum=x
allsuc(totsuc)=uplow(suc.nom)
endif
getnext(suc)
wend
maxsuc=totsuc
maxnum=totsuc
x=1 do SucListP sucaff=="û"
endif

scr:c11
root:c5
if kqte=2 root="ext\s" else root="ext\"
scr=trim(root)+"rech"
if kind=1 | ((kprix<>0) & (kvente=0)) scr=trim(root)+"rechx"
if kvente=1 scr=trim(root)+"rech"
if 0=1
window("ext\rech")
window("ext\rechx")
window("ext\rechb")
window("ext\rechxb")
endif

vinter:b
needto:b
 
M

Mark A. Odell

I have to retreive data from a old DOS program written in 1995 but I
don't recognize the
language -- Here's a sample of the code used in the .lib files -- Can
anyone tell me what language it is ? Thanks in advance. Here's the code
sample :

[snip]

It's not C.
 
R

Richard Bos

chris said:
I have to retreive data from a old DOS program written in 1995 but I don't
recognize the
language -- Here's a sample of the code used in the .lib files -- Can anyone
tell me what language it is ? Thanks in advance. Here's the code sample :
if partiel=2
mn=record(numrec) complex=0
do LoadOpt,PrepTables
name_:c20=""+ppn(pnt(oo))
flush(0)
if exist(trim(name_)+".001") kill(trim(name_)+".001")
top(oo)
index(oo,1,1)

This is certainly not C. It looks like some kind of XBase. It's not
Clipper, but it may be FoxPro, or perhaps a later version of DBase.

Richard
 
J

Jeff Rodriguez

chris said:
I have to retreive data from a old DOS program written in 1995 but I don't
recognize the
language -- Here's a sample of the code used in the .lib files -- Can anyone
tell me what language it is ? Thanks in advance. Here's the code sample :

Does this help:
http://www.filext.com/detaillist.php?extdetail=lib

If not try plugging in a few other file extensions, It doesn't look like C to me
though.

Jeff
 
R

Rick

Maybe I'm completely wrong, I only know a handfull of programming languages,
but it looks quit alot like some sort of Basic.

Greetings,
Rick
 
C

CBFalconer

chris said:
I have to retreive data from a old DOS program written in 1995
but I don't recognize the language -- Here's a sample of the
code used in the .lib files -- Can anyone tell me what language
it is ? Thanks in advance. Here's the code sample :
.... snip ...

I suspect it is one of the every mutating non-standardized
uSoft/Gates methods of trapping the end user into interminable
updates. It might even be one of his so-called Basics. What you
show does not even have consistency in indentation nor end
markers.

Rots of Ruck. :)
 
J

Joona I Palaste

CBFalconer said:
... snip ...
I suspect it is one of the every mutating non-standardized
uSoft/Gates methods of trapping the end user into interminable
updates. It might even be one of his so-called Basics. What you
show does not even have consistency in indentation nor end
markers.
Rots of Ruck. :)

I have seen many dialects of BASIC, and this looks wildly different from
any of them. I think it's not BASIC at all, but instead some
application-specific scripting language.
 
C

chris

Thank you all for your inputs. I finally got an answer : Believe it or not,
it seems that it is some sort of assembler language !

Thanks again!
 
P

Programmer Dude

Joona said:
I have seen many dialects of BASIC, and this looks wildly different
from any of them.

Yes. I believe most (if not all) BASICs use "If ... Then", and
the code sample had no "Then". I also don't believe I've ever
seen a BASIC with a "&" AND operator.
 
S

Sheldon Simms

Thank you all for your inputs. I finally got an answer : Believe it or not,
it seems that it is some sort of assembler language !

I don't believe it. Please elaborate. For which processor is
this supposedly assembly language?
 
J

Joona I Palaste

I don't believe it. Please elaborate. For which processor is
this supposedly assembly language?

Must be a canny 'ard processor for its assembly language to support
if...endif constructs. Cannot be a real silicon one, can it?
 
R

Richard Bos

chris said:
Thank you all for your inputs. I finally got an answer : Believe it or not,
it seems that it is some sort of assembler language !

I don't believe it. I've never seen an assembler language with database
functions (top, index, record) built in.

Richard
 
A

Alex

Programmer Dude said:
Yes. I believe most (if not all) BASICs use "If ... Then", and
the code sample had no "Then". I also don't believe I've ever
seen a BASIC with a "&" AND operator.

Several use no "then" to indicate a block "if". In one I know of, (somewhat
perversely) "then" is optional for a single-line "if", but required as the
last thing on a line for a block "if". But I guess that's what happens when
there is no standard, thankfully unlike C.
 
R

Robert Stankowic

Joona I Palaste said:
Must be a canny 'ard processor for its assembly language to support
if...endif constructs. Cannot be a real silicon one, can it?

Certainly not "assembly language", but IIRC some high level "niche"
languages had the word assembler in their name ("list assembler" or so).
But that was uh quite a while ago.
Robert
 
J

Joona I Palaste

I don't believe it. I've never seen an assembler language with database
functions (top, index, record) built in.

Whatever next? Object-oriented assembly language with an in-built
garbage collector? (Anyone want to guess which language that garbage
collector would then be written in?)
 
C

chris

Seems that this assembler language is very close to dbase as for the file
structure and to Basic for the coding. I don't know much more if I do and
since so much people were puzzled by the answer, I'll post it back on the
NG.

Thanks again.
 
J

Joona I Palaste

chris said:
Seems that this assembler language is very close to dbase as for the file
structure and to Basic for the coding. I don't know much more if I do and
since so much people were puzzled by the answer, I'll post it back on the
NG.
Thanks again.

I still don't think it's assembler language at all. Where did you see it
being called assembler language?
 
A

August Derleth

Joona I Palaste said:
Whatever next? Object-oriented assembly language with an in-built
garbage collector? (Anyone want to guess which language that garbage
collector would then be written in?)

Why, it would be etched in the silicon! Mark and sweep would be
accomplished by a little arm attached to a brush moving around in RAM,
sweeping bits into a bit bucket. Then, of course, you'd get the
classic HBF opcode (Halt if Bit bucket Full), so beloved on old IBM
machines. As lazy programmers would code this as HCF (Halt and Catch
Fire), we'd cull the herd and make the world more clueful. Net result:
Fewer people asking about Ada on comp.lang.c.
 
D

Dan Pop

In said:
Must be a canny 'ard processor for its assembly language to support
if...endif constructs. Cannot be a real silicon one, can it?

There have been some "high level" assemblers providing such constructs
in order to reduce the amount of spaghetti in the source code. I guess
no true assembly programmer would use such a thing, but some vendors
tried their hands at selling them.

Dan
 
D

Dan Pop

In said:
Several use no "then" to indicate a block "if". In one I know of, (somewhat
perversely) "then" is optional for a single-line "if", but required as the
last thing on a line for a block "if". But I guess that's what happens when
there is no standard, thankfully unlike C.

There has always been a BASIC standard, namely the K'n'K book, but many
implementors took the liberty of doing things their own way. Sometimes
to improve the K'n'K specification (completely lacking structured
programming features), sometimes because their implementation had to fit
into something like 4 KB of ROM and some features had to be "censored".

Dan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,104
Messages
2,570,643
Members
47,247
Latest member
youngcoin

Latest Threads

Top