(* Collection of code snippets by Arne Vajhøj *)
(* (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) *)
program bit2float;

{$APPTYPE CONSOLE}

uses
  SysUtils;

type
   singlechars = array [0..3] of char;

function char2single(a : singlechars) : single;

var
   res : single;

begin
    move(a, res, 4);
    char2single := res;
end;

var
  sa : singlechars;
  s : single;

begin
  sa[0] := chr(100);
  sa[1] := chr(100);
  sa[2] := chr(100);
  sa[3] := chr(100);
  s := char2single(sa);
  writeln(s);
end.
