468,503 Members | 2,160 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,503 developers. It's quick & easy.

convert Pascal to C

6
I have this Pascal code. Can anyone convert it to C code for me, plz? Im a newbie in programming. Thanks a lot.

const
maxsize=100;
type
DICTIONARY=record
last:integer
data: array[1...maxsize] of name type
end;
procedure MAKENULL (var A; DICTIONARY);
begin
A.last:=0
end;{MAKENULL}
procedure MEMBER (x: nametype; var A: DICTIONARY): boolean;
var
i:integer;
begin
for i:=1 to A.last do
if A.last[i]=x then return (true);
return (false) { if x is not found}
end; {MEMBER}
Dec 1 '07 #1
1 3465
weaknessforcats
9,207 Expert Mod 8TB
It shouldn't be too hard.

maxsize is a variable.

DICTIONARY is probably a struct.

A procedure is function.

I'm not a Pascal person but that's how it appears.
Dec 1 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

26 posts views Thread by sam | last post: by
17 posts views Thread by David Scemama | last post: by
2 posts views Thread by Piterek | last post: by
7 posts views Thread by SMALLp | last post: by
54 posts views Thread by Ruud | last post: by
3 posts views Thread by gieforce | last post: by
reply views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.