1,075,886 Members — Technology Publication meets Social Media

# Latest Posts in Legacy Languages

## Re: HELP in Legacy Languages

Moved to Legacy lnaguages section, till we find which language it is

peter_budo
Code tags enforcer
Moderator
15,788 posts since Dec 2004
Reputation Points: 2,867
Skill Endorsements: 50

## Re: HELP in Legacy Languages

I don't know what language that is, but it's not Java. You're in the wrong forum my friend.

JamesCherrill
... trying to help
Moderator
8,514 posts since Apr 2008
Reputation Points: 2,583
Skill Endorsements: 30

## HELP in Legacy Languages

Given a length of wire P units long, where P is an integer, it is possible in some cases to bend
the wire into an isosceles triangle(with two sides equal) where the lengths of all the sides are
also integers. For example a wire of length P = 3 units can be bent into an isosceles triangle,
while a wire of length P = 4 can not. For some lengths there is more than one isosceles
triangle with integer length sides. Of those isosceles triangles with integer length sides some
will have an area which is also an integer, while others will not.
The area of a triangle, given the lengths of its three sides a; b; c, is
Area =
p
m(m-a)(m-b)(m-c);
where m = (a + b + c)=2.
(a) Write a function, which has as input an integer length P, and outputs(not prints) a
triple (a; b;A), where a is the integer length of the two equal length sides of an isosceles
triangle, b is the integer length of the other side, and A is the integer area of the
triangle. The function should output non-zero values (a; b;A) when there is ONLY
ONE isosceles triangle which has both integer length sides, and integer area,
otherwise it should return (0; 0; 0). Test your function with P = 15, where the output
should be (0; 0; 0) and P = 16, where the output should be (5; 6; 12).

This is what i've done at the moment, i get the right output for P = 15 but cannot get the right output for p = 16:

`````` function [a,b,A] = Funct1(p)

m = p/2;
n = fix(m);
for a = 1:n

b = 2*a - p;
p = 2*a+b;
A = sqrt(m*((m - a)^2)*(m-b));
if (A~=fix(A))
a = 0; b = 0; A = 0;
end
end
end

Thank You
``````
Lindita01
Newbie Poster
1 post since May 2013
Reputation Points: 0
Skill Endorsements: 0

## Re: Problem with running a .hta (vb)script on a fileserver in Legacy Languages

Thnx Reverend Jim, I kind a gave up the hope for some pointers regarding this question of mine..

• The domain is the same. (file-server and PC's are all in the same domain.)
• It's run from the same account
• Everything is done by the .hta script, no external vbscript.
The .hta script starts by querying the access DB, Then shows the user a form,
processing the form involves querying the access DB, creating/showing .xls files.

It would be a lot easier maintaining the .hta file is you only have to update the version
on the server.

I guess that you're right, it prob. is a rights issue with/from access.
I just don't know "where" or how to fix it.. :(

Mocabilly
Newbie Poster
17 posts since Jun 2009
Reputation Points: 10
Skill Endorsements: 0

## Re: matlab OCR of URDU in Legacy Languages

This OCR fonts software provides multiple font formats for generate barcodes.

Billyseven
Newbie Poster
1 post since Apr 2013
Reputation Points: 0
Skill Endorsements: 0

## Re: Oracle forms 11g GO_BLOCK in Legacy Languages

I can think of only two reasons the GO_BLOCK would not work:
1. You have mispelled the block name or
2. You have no navigable items in the destination block.

herbiebill
Newbie Poster
3 posts since Sep 2007
Reputation Points: 10
Skill Endorsements: 0

## Dartmouth Basic Documentation in Legacy Languages

Hello all

I am seeking to find any documentation anyone out there has about Dartmouth Basic.

I already have the 1964 and 1968 documents from Dartmouth regarding Dartmouth Basic, I am seeking additional documentation, perhaps produced by a third party, such as IBM or GE.

Any help appreciated
Glenn

Bluescreendeath
Newbie Poster
7 posts since May 2012
Reputation Points: 0
Skill Endorsements: 0

## Re: Help with Scheme in Legacy Languages

Scheme already has a function named `append`, which takes multiple lists as arguments and returns the concatenation of all the lists. So you should name your function something else, like `append-element` perhaps.

You can define your function by simply using the existing `append` function to concatenate the list you want to append to with another list containing only the item you want to append like this:

``````(define (append-element x xs)
(append xs (list x)))
``````
sepp2k
Posting Whiz in Training
227 posts since Jul 2012
Reputation Points: 62
Skill Endorsements: 8

## Help with Scheme in Legacy Languages

A function (append) which takes an atom and a list and adds the element to the end of the list.
Example: (append 'A '(B C D)) -> (B C D A)

Any help will be appreciated

Kunj123
Newbie Poster
1 post since Mar 2013
Reputation Points: 0
Skill Endorsements: 0

## Re: Prolog Alternative to Findall in Legacy Languages

Like would you not just answer four times more solutions when doing a query? Anyway little Googling gives you:

http://old.nabble.com/Re%3A-find-n-solutions-p27835812.html

pyTony
pyMod
Moderator
6,301 posts since Apr 2010
Reputation Points: 879
Skill Endorsements: 26

## Re: Has anybody used Nimrod? in Legacy Languages

Nimrod certainly doesn't have traits like Scala. Nimrod is a very different language from Ruby, but I don't think Nimrod has anything that is really equivalent to mixins either.

My desire for multiple inheritence is entirely motivated by Nimrod's static type checking. Each procedure expects me to declare the types of every parameter. Under those circumstances, I expect the freedom to be able to declare my objects to be of more than one type. In Ruby you don't declare the types of your parameters, so the entire issue is avoided for that language.

One interesting powerful feature of Nimrod is the fact that you can add new methods to existing classes, even if the class is defined in another module. Ruby allows you to do almost the same thing, but when you do it in Ruby you are allowed to violate the privacy of the private members of a class, and fortunately Nimrod prevents this. Unfortunately, when you add methods in Nimrod you need to specify just one class; there is no way to make those methods available for other classes except by defining the methods again or having each class use up its one precious superclass slot.

Fortunately, according to its website Nimrod is still changing, so perhaps there is a chance that multiple inheritence will be added before version 1 is released and new features become much harder to add. For example, I think it would be entirely in the flavor of Nimrod to have a declaration something like:

``````extend TList: TCollection
``````

where `TList` and `TCollection` are types declared earlier. `TCollection` would probably either be an `object` with no fields, or else a new kind of type specially added to the language for this purpose, but either way we would then have the power to call methods and procedures with a `TList` argument where a `TCollection` is expected. If you already have a big library of `TCollection` methods, then with one stroke you have brought all of that power into `TList`. You would probably also have to override a few `TCollection` methods to hook up the internals of `TList` to the `TCollection` interface, but it would still be enormously powerful.

It would be just like Ruby mixins but it would be type safe and you wouldn't be able to define new fields on your classes in the way that Ruby mixins can. Just like in Ruby you would be able to add the mixin anywhere in your source code, not just where your class is defined, so it fits in nicely with your ability to define methods anywhere in Nimrod.

bguild
Posting Whiz
331 posts since Oct 2012
Reputation Points: 167
Skill Endorsements: 7

## Re: Has anybody used Nimrod? in Legacy Languages

but lack of multiple inheritence is troublesome

Lack of multiple inheritance is a problem if you don't have traits (Scala) or mixins (Ruby). If Nimrod has any of those, it should be fine IMO.

~s.o.s~
Failure as a human
12,220 posts since Jun 2006
Reputation Points: 3,307
Skill Endorsements: 55

## Re: Has anybody used Nimrod? in Legacy Languages

There are some interesting design choices in Nimrod. I read the tutorial and it not only explained how to use the language; it also sometimes mentioned reasons for some of the features and many of those reasons are about efficiency. The compiler requires forward declarations because looking ahead would slow down compilation. Recursive types need to be defined together in a single `type` statement because, "anything else would require arbitrary symbol lookahead which slows down compilation." And multidimensional openarrays are forbidden because they are rarely needed and cannot be implemented efficiently.

Perhaps I have been spoiled by languages like Java and Haskell which are more concerned with helping me get things done than with doing things efficiently, but I would rather not have my language mandate that everything I write be manually optimized. If I write a program that takes a little longer to compile than it could, I still consider it the compiler's duty to compile it. It's my time to waste. And if I want multidimensional openarrays, then please accept that I don't care about efficiency and give me multidimensional openarrays.

Methods that have dynamic dispatch on all arguments is a nice feature. I expect there are some interesting things that can be done with that, though tracking down exactly what verion of a method might be ultimately called could be troublesome. At least with single dispatch it is easier to keep track of all the various versions of a method.

I don't mind minimalist support for object oriented programming in principle. After all, object oriented programming can be done in any language, but lack of multiple inheritence is troublesome. If you need a class that can take on more than one role, such as being passed to a `sort` procedure that expects a `TList`, but is also able to be passed to `lookup` that expects a `TMap`, then you need a work-around. It seems that you are forced to use composition in place of inheritence by creating an adapter class. For example, your class `TBox` could be a subclass of `TList`, and then you can have another class called `TMapBox` that is a subclass of `TMap` and contains a `TBox`.

Nimrod makes this relatively painless since classes can be defined with a brief notation and defining two classes in the same module gives them total access to each other's private members, but it seems far more confusing than it would be if `TBox` could have simply been both a `TMap` and a `TList`.

If multiple inheritence by adapter is difficult to read then it may be a part of a general carelessness toward reabability in the design of Nimrod. Another example is the concept of a `var` parameter which allows a procedure to modify a variable that is being passed as an argument. In C if you want to do that you pass the address of your variable and everyone can see you are doing that when the function is called. When this is done in Nimrod the arguments that might be modified look exactly like any other arguments; you just have to know that the procedure might be changing them.

I would have expected the use of `var` parameters to be discouraged, but it seems to be seriously encouraged. The built-in procedure `new` is used for dynamic allocation, but instead of returning a pointer to the new memory, it takes a pointer as an argument. Every procedure that returns a value also has a `result` variable which apparently exists mostly to make it easier for a procedure to return a value that it gets from a procedure call that modifies its arguments.

On the other hand I very much approve of how Nimrod makes parameters unmodifiable by default. The vast majority of functions never intend to modify their parameters, but parameters aren't declared to be const nearly as often because it is an unnecessary chore. I often wish that languages would stop asking us to flag parameters that can't be modified and instead ask us to flag parameters that can be modified.

Macros are a fun idea. They are awfully powerful, and when you want to get something done it is nice to feel that you have almost no limits, but it can't really be a good thing. Being able to read code easily is far more important than being able to write it easily, and when macros are involved it's hard to even be sure what language you are trying to read. I can't fault Nimrod for having a powerful macro system, but I hope it is used very rarely. It's disturbing that even the `!=` operator is a macro.

I can't help but think that if the designers of Nimrod would put the cleverness that they put into the macro system into the rest of the language they could find a way to get rid of most of the need for macros. For example, there is the `when` statement which is essentially a macro version of an `if` statement, where if the `when` condition is true then the `else` clause doesn't even get type-checked. Deliberately not type-checking part of a program is surely a bad sign for reliability. You can even declare a variable inside a `when` and then use it outside the `when`. I don't see what all the dangerous trickery of `when` is trying to accomplish that couldn't be managed more safely with a simple `if`.

bguild
Posting Whiz
331 posts since Oct 2012
Reputation Points: 167
Skill Endorsements: 7

## Re: Has anybody used Nimrod? in Legacy Languages

Actually, Nimrod uses a syntax mix that reminds me of Python and C. Looks like it translates nimrod source code to C code and then uses a common C compiler like GCC to produce the executable file.

Shades of BCX that used a similar approach for Basic --> C --> exectuable.

vegaseat
DaniWeb's Hypocrite
Moderator
6,475 posts since Oct 2004
Reputation Points: 1,447
Skill Endorsements: 36

## Re: Has anybody used Nimrod? in Legacy Languages

Makes me wonder which computer language Albert Einstein would have use had he lived long enough.

vegaseat
DaniWeb's Hypocrite
Moderator
6,475 posts since Oct 2004
Reputation Points: 1,447
Skill Endorsements: 36

## Re: Prolog Alternative to Findall in Legacy Languages

Also, what exactly are you trying to accomplish - describe the problem domain a bit more fully please.

rubberman
Posting Maven
2,571 posts since Mar 2010
Reputation Points: 365
Skill Endorsements: 52

## Re: Prolog Alternative to Findall in Legacy Languages

Argh! I haven't written any prolog in probably 25 years. I'll have to do some review of my copy of Clocksin and Mellish (the bible of prolog) and get back to you on this. Are you in a hurry? :-)

rubberman
Posting Maven
2,571 posts since Mar 2010
Reputation Points: 365
Skill Endorsements: 52

## Re: Has anybody used Nimrod? in Legacy Languages

Let's see. Over 30+ years, the computer languages I have used professionally to earn a living have included Fortran, Assembler (of various sorts), Basic, dBase (II, III, and IV), SQL, Quel, Cobol, Dibol, C, C++, Java, Lisp, SmallTalk, Prolog, Snobol, sh, csh, bash, ksh, Ada and PL/SQL (a derivative of Ada), Transact-SQL, Perl, Python,... And a bunch more I don't remember any longer. Will it disappoint you that I have never used Nimrod? :-) I have looked at, but never used APL (though a mathematician friend of mine is a big proponent of it).

In any case, it sounds like a good example of my favorite language, YAPL. YAPL - Yet Another Programming Language. :-) Check it out, and let us know what you think.

rubberman
Posting Maven
2,571 posts since Mar 2010
Reputation Points: 365