AMPLE

From Seo Wiki - Search Engine Optimization and Programming Languages
Jump to navigationJump to search

AMPLE is the name of two different programming languages.

AMPLE the Music Language

AMPLE (Advanced Music Production Language and Environment) was a FORTH-like programming language for programming the 500/5000 series of add-on music synthesisers for the BBC Microcomputer. AMPLE was produced by Hybrid Technologies, Cambridge, England in the mid-1980s. Many AMPLE programs were published in Acorn User magazine.

AMPLE the Scripting Language

AMPLE (Advanced Multi-Purpose LanguagE) is a scripting programming language and a part of the Falcon Framework software framework developed for the Apollo/Domain computer by Mentor Graphics. It is a dynamically typed C-like programming language, with for example vector types added. AMPLE has been enhanced recently with hash-like data types in version 9.0 of the AMPLE-IC variant (IC-Station Product line).

As the Apollo/Domain was very popular in computer-aided engineering (especially in electronic design automation), AMPLE is still used in several Mentor Graphics applications such as Design Architect IC and IC Station. These tools are built on the Falcon Framework, and run on Unix and Linux workstations. Some of the PCB design tools even run on Windows NT.

Example:

/* A simple Hello World Example */
function hello() 
{
  // Single Line output
  $writeln("Hello World !");
}

AMPLE Functions feature qualifiers for Transcript mode, a Quick Help reference text, default values for function arguments.

function split(s:string,d : optional {default = " "} ),
  QUICK_HELP "Splits string <s> delimited by <d> in a vector"
{
  local ret=[];
  local n;
  local e="";
  for(n=0;n<length(s);n=n+1)
  {
    if(s[n] != d )
      e=$strcat(e,s[n]);
    else
    {
      ret=lappend(ret,e);
      e="";
    }
  }
  if(e != "") ret=lappend(ret,e);

  return ret;
}


function foo( param : string { default=($last!=void)?$last:"my default value" } )
  , INDIRECT   // transcript all commands each in the function body
  , QUICK_HELP "Just a little Example Function"
{
  local n=0;

  for(n=0;n<length(param);n=n+1)
  {
    $writeln($strcat("=> ",param[0:n]));
  }

  return 0;
}

If you like SEOmastering Site, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...