Hello World

As it is custom in all programming languages, we, too, start out with the classic example 'Hello World':

<HTML>

<HEAD>

  <TITLE>Hello World</TITLE>

<HEAD>

 

<BODY>

<%

  ? "Hello AFP World!"

%>

<BODY>

<HTML>

You will notice that the code inside the source code is totally normal HTML. Similar to other scripting languages (ASP, PHP and others), certain delimiters – in our case the character percent (%) – mark the beginning and the end of the AFP code. This serves to structurally and syntactically separate HTML tags from Visual FoxPro code.

In the AFP, there are no constraints when it comes to mixing the different code blocks with AFP code or HTML. By the same token, you may display HTML within a scripting block. The examples below show this in greater detail.