Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/candidate-9.2.x'
Browse files Browse the repository at this point in the history
Signed-off-by: Gordon Smith <[email protected]>

# Conflicts:
#	helm/hpcc/Chart.yaml
#	helm/hpcc/templates/_helpers.tpl
#	helm/hpcc/templates/dafilesrv.yaml
#	helm/hpcc/templates/dali.yaml
#	helm/hpcc/templates/dfuserver.yaml
#	helm/hpcc/templates/eclagent.yaml
#	helm/hpcc/templates/eclccserver.yaml
#	helm/hpcc/templates/eclscheduler.yaml
#	helm/hpcc/templates/esp.yaml
#	helm/hpcc/templates/localroxie.yaml
#	helm/hpcc/templates/roxie.yaml
#	helm/hpcc/templates/sasha.yaml
#	helm/hpcc/templates/thor.yaml
#	version.cmake
  • Loading branch information
GordonSmith committed Jul 27, 2023
2 parents d2f29c6 + bc86a18 commit b0fa567
Show file tree
Hide file tree
Showing 101 changed files with 2,602 additions and 603 deletions.
169 changes: 137 additions & 32 deletions .github/workflows/build-assets.yml

Large diffs are not rendered by default.

51 changes: 32 additions & 19 deletions .github/workflows/build-vcpkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
internal_ref: ${{ steps.vars.outputs.internal_ref }}
community_tag: ${{ steps.vars.outputs.community_tag }}
internal_tag: ${{ steps.vars.outputs.internal_tag }}
community_branch: ${{ steps.vars.outputs.community_branch }}
candidate_base_branch: ${{ steps.vars.outputs.candidate_base_branch }}
cmake_docker_config: ${{ steps.vars.outputs.cmake_docker_config }}
platform: "1"
platform_testing_do_not_release: ${{ steps.skip_check.outputs.platform }}
Expand All @@ -56,8 +56,7 @@ jobs:
community_tag=$(echo $community_ref | cut -d'/' -f3)
echo "community_tag=$community_tag" >> $GITHUB_OUTPUT
echo "internal_tag=$(echo $community_tag | sed 's/community/internal/')" >> $GITHUB_OUTPUT
community_base_ref=${{ github.event.base_ref || github.ref }}
echo "community_branch=$(echo $community_base_ref | cut -d'/' -f3)" >> $GITHUB_OUTPUT
echo "candidate_base_branch=${{ github.base_ref }}" >> $GITHUB_OUTPUT
echo "cmake_docker_config=-DCMAKE_BUILD_TYPE=RelWithDebInfo -DVCPKG_FILES_DIR=/hpcc-dev -DCPACK_THREADS=0 -DUSE_OPTIONAL=OFF" >> $GITHUB_OUTPUT
- id: skip_check
Expand All @@ -72,7 +71,6 @@ jobs:
build-docker:
name: Build Docker
# if: github.repository == 'hpcc-systems/HPCC-Platform'
needs: preamble
runs-on: ubuntu-22.04
strategy:
Expand All @@ -81,6 +79,7 @@ jobs:
- os: ubuntu-22.10
event_name: "pull_request"
- os: ubuntu-22.04
name: k8s
container: true
event_name: "schedule"
- os: ubuntu-22.04
Expand All @@ -94,11 +93,16 @@ jobs:
- os: amazonlinux
event_name: "schedule"
- os: centos-7
name: LN
ln: true
event_name: "schedule"
fail-fast: false

steps:
- name: Free additional disk space (remove Android SDK + Tools)
run: |
sudo rm -rf /usr/local/lib/android
- name: Checkout HPCC-Platform
if: ${{ contains(matrix.event_name, github.event_name) && needs.preamble.outputs.platform }}
uses: actions/checkout@v3
Expand All @@ -122,8 +126,12 @@ jobs:
id: vars
working-directory: ${{ needs.preamble.outputs.folder_platform }}/vcpkg
run: |
echo "vcpkg_sha_short=$(git rev-parse --short=8 HEAD)" >> $GITHUB_OUTPUT
echo "docker_label=hpccsystems/platform-build-${{ matrix.os }}:$(git rev-parse --short=8 HEAD)" >> $GITHUB_OUTPUT
vcpkg_sha_short=$(git rev-parse --short=8 HEAD)
echo "vcpkg_sha_short=$vcpkg_sha_short" >> $GITHUB_OUTPUT
docker_build_label=hpccsystems/platform-build-${{ matrix.os }}
echo "docker_build_label=$docker_build_label" >> $GITHUB_OUTPUT
echo "docker_tag=$docker_build_label:$vcpkg_sha_short" >> $GITHUB_OUTPUT
echo "docker_tag_candidate_base=$docker_build_label:${{ needs.preamble.outputs.candidate_base_branch }}" >> $GITHUB_OUTPUT
- name: Print vars
run: |
Expand All @@ -146,12 +154,15 @@ jobs:
build-args: |
VCPKG_REF=${{ steps.vars.outputs.vcpkg_sha_short }}
tags: |
${{ steps.vars.outputs.docker_label }}
cache-from: type=registry,ref=${{ steps.vars.outputs.docker_label }}
${{ steps.vars.outputs.docker_tag_candidate_base }}
cache-from: |
type=registry,ref=${{ steps.vars.outputs.docker_tag_candidate_base }}
type=registry,ref=${{ steps.vars.outputs.docker_tag }}
cache-to: type=inline

# Communtiy Build
- name: CMake Packages
if: ${{ !matrix.container && !matrix.ln && contains(matrix.event_name, github.event_name) && needs.preamble.outputs.platform }}
if: ${{ !matrix.ln && !matrix.container && contains(matrix.event_name, github.event_name) && needs.preamble.outputs.platform }}
run: |
mkdir -p ${{ needs.preamble.outputs.folder_build }}
declare -a plugins
Expand All @@ -163,12 +174,12 @@ jobs:
for plugin in "${plugins[@]}"; do
sudo rm -f ${{ needs.preamble.outputs.folder_build }}/CMakeCache.txt
sudo rm -rf ${{ needs.preamble.outputs.folder_build }}/CMakeFiles
docker run --rm --mount ${{ needs.preamble.outputs.mount_platform }} --mount ${{ needs.preamble.outputs.mount_build }} ${{ steps.vars.outputs.docker_label }} "\
docker run --rm --mount ${{ needs.preamble.outputs.mount_platform }} --mount ${{ needs.preamble.outputs.mount_build }} ${{ steps.vars.outputs.docker_tag_candidate_base }} "\
cmake -S /hpcc-dev/HPCC-Platform -B /hpcc-dev/build ${{ needs.preamble.outputs.cmake_docker_config }} -D$plugin=ON -DCONTAINERIZED=OFF -DCPACK_STRIP_FILES=OFF && \
cmake --build /hpcc-dev/build --parallel $(nproc) --target package"
# Disabled as not currently needed ---
# docker run --rm --mount ${{ needs.preamble.outputs.mount_platform }} --mount ${{ needs.preamble.outputs.mount_build }} $docker_label "cmake -S /hpcc-dev/HPCC-Platform -B /hpcc-dev/build ${{ needs.preamble.outputs.cmake_docker_config }} -D$plugin=ON -DCONTAINERIZED=OFF -DCPACK_STRIP_FILES=ON"
# docker run --rm --mount ${{ needs.preamble.outputs.mount_platform }} --mount ${{ needs.preamble.outputs.mount_build }} $docker_label "cmake --build /hpcc-dev/build --parallel $(nproc) --target package"
# docker run --rm --mount ${{ needs.preamble.outputs.mount_platform }} --mount ${{ needs.preamble.outputs.mount_build }} ${{ steps.vars.outputs.docker_tag_candidate_base }} "cmake -S /hpcc-dev/HPCC-Platform -B /hpcc-dev/build ${{ needs.preamble.outputs.cmake_docker_config }} -D$plugin=ON -DCONTAINERIZED=OFF -DCPACK_STRIP_FILES=ON"
# docker run --rm --mount ${{ needs.preamble.outputs.mount_platform }} --mount ${{ needs.preamble.outputs.mount_build }} ${{ steps.vars.outputs.docker_tag_candidate_base }} "cmake --build /hpcc-dev/build --parallel $(nproc) --target package"
done
- name: CMake Containerized Packages
Expand All @@ -177,28 +188,30 @@ jobs:
mkdir -p ${{ needs.preamble.outputs.folder_build }}
sudo rm -f ${{ needs.preamble.outputs.folder_build }}/CMakeCache.txt
sudo rm -rf ${{ needs.preamble.outputs.folder_build }}/CMakeFiles
docker run --rm --mount ${{ needs.preamble.outputs.mount_platform }} --mount ${{ needs.preamble.outputs.mount_build }} ${{ steps.vars.outputs.docker_label }} "\
docker run --rm --mount ${{ needs.preamble.outputs.mount_platform }} --mount ${{ needs.preamble.outputs.mount_build }} ${{ steps.vars.outputs.docker_tag_candidate_base }} "\
cmake -S /hpcc-dev/HPCC-Platform -B /hpcc-dev/build ${{ needs.preamble.outputs.cmake_docker_config }} -DINCLUDE_PLUGINS=${{ needs.preamble.outputs.include_plugins }} -DCONTAINERIZED=ON -DSUPPRESS_REMBED=ON -DSUPPRESS_V8EMBED=ON -DSUPPRESS_SPARK=ON -DCPACK_STRIP_FILES=OFF && \
cmake --build /hpcc-dev/build --parallel $(nproc) --target package"
# Internal Build ---
- name: CMake LN Packages
if: ${{ matrix.ln && contains(matrix.event_name, github.event_name) && needs.preamble.outputs.platform }}
if: ${{ matrix.ln && !matrix.container && contains(matrix.event_name, github.event_name) && needs.preamble.outputs.platform }}
run: |
mkdir -p ${{ needs.preamble.outputs.folder_build }}
sudo rm -f ${{ needs.preamble.outputs.folder_build }}/CMakeCache.txt
sudo rm -rf ${{ needs.preamble.outputs.folder_build }}/CMakeFiles
docker run --rm --mount ${{ needs.preamble.outputs.mount_platform }} --mount ${{ needs.preamble.outputs.mount_ln }} --mount ${{ needs.preamble.outputs.mount_build }} ${{ steps.vars.outputs.docker_label }} "\
docker run --rm --mount ${{ needs.preamble.outputs.mount_platform }} --mount ${{ needs.preamble.outputs.mount_ln }} --mount ${{ needs.preamble.outputs.mount_build }} ${{ steps.vars.outputs.docker_tag_candidate_base }} "\
cmake -S /hpcc-dev/LN -B /hpcc-dev/build -DHPCC_SOURCE_DIR=/hpcc-dev/HPCC-Platform ${{ needs.preamble.outputs.cmake_docker_config }} -DINCLUDE_PLUGINS=${{ needs.preamble.outputs.include_plugins }} -DCONTAINERIZED=OFF -DSUPPRESS_REMBED=ON -DSUPPRESS_V8EMBED=ON -DSUPPRESS_SPARK=ON -DCPACK_STRIP_FILES=OFF && \
cmake --build /hpcc-dev/build --parallel $(nproc) --target package"
# Disabled as not currently needed ---
# docker run --rm --mount ${{ needs.preamble.outputs.mount_platform }} --mount ${{ needs.preamble.outputs.mount_ln }} --mount ${{ needs.preamble.outputs.mount_build }} $docker_label "cmake -S /hpcc-dev/LN -B /hpcc-dev/build -DHPCC_SOURCE_DIR=/hpcc-dev/HPCC-Platform ${{ needs.preamble.outputs.cmake_docker_config }} -DINCLUDE_PLUGINS=${{ needs.preamble.outputs.include_plugins }} -DCONTAINERIZED=OFF -DSUPPRESS_REMBED=ON -DSUPPRESS_V8EMBED=ON -DSUPPRESS_SPARK=ON -DCPACK_STRIP_FILES=ON"
# docker run --rm --mount ${{ needs.preamble.outputs.mount_platform }} --mount ${{ needs.preamble.outputs.mount_ln }} --mount ${{ needs.preamble.outputs.mount_build }} $docker_label "cmake --build /hpcc-dev/build --parallel $(nproc) --target package"
# docker run --rm --mount ${{ needs.preamble.outputs.mount_platform }} --mount ${{ needs.preamble.outputs.mount_ln }} --mount ${{ needs.preamble.outputs.mount_build }} ${{ steps.vars.outputs.docker_tag_candidate_base }} "cmake -S /hpcc-dev/LN -B /hpcc-dev/build -DHPCC_SOURCE_DIR=/hpcc-dev/HPCC-Platform ${{ needs.preamble.outputs.cmake_docker_config }} -DINCLUDE_PLUGINS=${{ needs.preamble.outputs.include_plugins }} -DCONTAINERIZED=OFF -DSUPPRESS_REMBED=ON -DSUPPRESS_V8EMBED=ON -DSUPPRESS_SPARK=ON -DCPACK_STRIP_FILES=ON"
# docker run --rm --mount ${{ needs.preamble.outputs.mount_platform }} --mount ${{ needs.preamble.outputs.mount_ln }} --mount ${{ needs.preamble.outputs.mount_build }} ${{ steps.vars.outputs.docker_tag_candidate_base }} "cmake --build /hpcc-dev/build --parallel $(nproc) --target package"
# Common ---
- name: Upload error logs
if: ${{ failure() || cancelled() }}
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-${{ matrix.package }}-logs
name: ${{ matrix.os }}-${{ matrix.ln }}-${{ matrix.container }}-logs
path: ${{ needs.preamble.outputs.folder_build }}/**/*.log

build-bare-metal:
Expand Down Expand Up @@ -343,5 +356,5 @@ jobs:
if: ${{ failure() || cancelled() }}
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-${{ matrix.package }}-logs
name: ${{ matrix.os }}--${{ matrix.ln }}-${{ matrix.container }}-logs
path: ./build/**/*.log
9 changes: 7 additions & 2 deletions cmake_modules/docMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ MACRO(DOCBOOK_TO_HTML _xsl_file _xml_file _out_dir _html_target _css_path _zip_t
endif()
get_filename_component(css_file_name ${_css_path} NAME)

set(_portaljs_path "${CMAKE_BINARY_DIR}/docs/portal-js/dist/index.js")
get_filename_component(portaljs_file_name ${_portaljs_path} NAME)

STRING(REGEX REPLACE "(.+)/([^/]+)$" "\\1" _out_dir1 "${_out_dir}")
STRING(REGEX REPLACE ".+/([^/]+)$" "\\1" _out_dir2 "${_out_dir}")

Expand All @@ -119,8 +122,10 @@ MACRO(DOCBOOK_TO_HTML _xsl_file _xml_file _out_dir _html_target _css_path _zip_t
ADD_CUSTOM_COMMAND(
COMMAND mkdir -p ${_out_dir}
COMMAND cp ${_css_path} ${_out_dir}/
OUTPUT ${_out_dir}/${css_file_name}
)
COMMAND cp ${_portaljs_path} ${_out_dir}/
OUTPUT ${_out_dir}/${css_file_name} ${_out_dir}/${portaljs_file_name}
DEPENDS portal-js
)
ADD_CUSTOM_TARGET(${_html_target}
COMMAND ${XSLTPROC_EXECUTABLE} --nonet --xinclude --stringparam html.stylesheet ${css_file_name} --stringparam generate.toc "book toc" --param chapter.autolabel 0 ${_xsl_file} ${_xml_file}
WORKING_DIRECTORY ${_out_dir}
Expand Down
16 changes: 13 additions & 3 deletions common/dllserver/thorplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ class HelperDll : implements ILoadedDllEntry, public CInterface
virtual const byte * getResource(unsigned id) const;
virtual bool getResource(size32_t & len, const void * & data, const char * type, unsigned id, bool trace) const;
virtual IPropertyTree &queryManifest() const override;
virtual const StringArray &queryManifestFiles(const char *type, const char *wuid) const override;
virtual const StringArray &queryManifestFiles(const char *type, const char *wuid, const char *tempRoot) const override;
bool load(bool isGlobal, bool raiseOnError);
bool loadCurrentExecutable();
bool loadResources();
Expand Down Expand Up @@ -492,16 +492,26 @@ IPropertyTree &HelperDll::queryManifest() const
return *querySingleton(manifest, manifestLock, [this]{ return getEmbeddedManifestPTree(this); });
}

const StringArray &HelperDll::queryManifestFiles(const char *type, const char *wuid) const
const StringArray &HelperDll::queryManifestFiles(const char *type, const char *wuid, const char *tempRoot) const
{
CriticalBlock b(manifestLock);
Linked<ManifestFileList> list = manifestFiles.find(type);
if (!list)
{
// The temporary path we unpack to is based on so file's current location and workunit
// MORE - this is good for deployed cases, may not be so good for standalone executables.
// Doesn't really work for cloud either - it needs to be in ephemeral there
StringBuffer tempDir;
splitFilename(name, &tempDir, &tempDir, &tempDir, nullptr);
if (!isEmptyString(tempRoot))
{
tempDir.append(tempRoot);
addPathSepChar(tempDir);
splitFilename(name, nullptr, nullptr, &tempDir, nullptr);
}
else
{
splitFilename(name, &tempDir, &tempDir, &tempDir, nullptr);
}
list.setown(new ManifestFileList(type, tempDir));
tempDir.append(".tmp").append(PATHSEPCHAR).append(wuid);
VStringBuffer xpath("Resource[@type='%s']", type);
Expand Down
2 changes: 1 addition & 1 deletion common/dllserver/thorplugin.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ interface ILoadedDllEntry : extends IInterface
virtual const byte * getResource(unsigned id) const = 0;
virtual bool getResource(size32_t & len, const void * & data, const char * type, unsigned id, bool trace=true) const = 0;
virtual IPropertyTree &queryManifest() const = 0;
virtual const StringArray &queryManifestFiles(const char *type, const char *tempDir) const = 0;
virtual const StringArray &queryManifestFiles(const char *type, const char *id, const char *tempRoot = nullptr) const = 0;
};

extern DLLSERVER_API ILoadedDllEntry * createDllEntry(const char *name, bool isGlobal, const IFileIO *dllFile, bool resourcesOnly);
Expand Down
3 changes: 3 additions & 0 deletions common/workunit/workunit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5011,6 +5011,9 @@ EnumMapping workunitSortFields[] =
{ WUSFwildwuid, "@" },
{ WUSFappvalue, "Application" },
{ WUSFfilewritten, "Files/File/@name" },
{ WUSFcostexecute, "@costExecute" },
{ WUSFcostcompile, "@costCompile" },
{ WUSFcostfileaccess, "@costFileAccess" },
{ WUSFterm, NULL }
};

Expand Down
5 changes: 4 additions & 1 deletion common/workunit/workunit.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1447,8 +1447,11 @@ enum WUSortField
WUSFwildwuid = 12,
WUSFecl = 13,
// WUSFcustom = 14, obsolete
WUSFappvalue=15,
WUSFappvalue = 15,
WUSFfilewritten = 16,
WUSFcostexecute = 17,
WUSFcostcompile = 18,
WUSFcostfileaccess = 19,
WUSFterm = 0,
WUSFreverse = 256,
WUSFnocase = 512,
Expand Down
90 changes: 90 additions & 0 deletions dockerfiles/vcpkg/platform-core-ubuntu-22.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
##############################################################################
#
# HPCC SYSTEMS software Copyright (C) 2020 HPCC Systems®.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
##############################################################################

# Create base container image to be used by all HPCC processes

ARG BASE_IMAGE=ubuntu:22.04
FROM ${BASE_IMAGE}

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get clean -y && \
apt-get autoclean -y && \
apt-get install -y -f && \
apt-get autoremove -y && \
apt-get update -y && \
apt-get install --no-install-recommends -y \
default-jdk \
elfutils \
expect \
g++ \
git \
git-lfs \
locales \
jq \
openssh-client \
openssh-server \
python3 \
python3-dev \
psmisc \
r-base-core \
r-cran-rcpp \
r-cran-inline \
rsync \
zip \
curl \
clang

ARG USE_CPPUNIT=1
RUN if [ ${USE_CPPUNIT} -eq 1 ] ; then apt-get install -y libcppunit-1.15-0 ; fi

# these are developer tools - we may want to move them elsewhere so that they are only in the incremental builds?

RUN apt-get install -y \
dnsutils \
gdb \
nano

RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.18.18/bin/linux/amd64/kubectl && \
chmod +x ./kubectl && \
mv ./kubectl /usr/local/bin

# Set the locale
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8

RUN groupadd -g 10001 hpcc
RUN useradd -s /bin/bash -m -r -N -c "hpcc runtime User" -u 10000 -g hpcc hpcc
RUN passwd -l hpcc

RUN mkdir /var/lib/HPCCSystems && chown hpcc:hpcc /var/lib/HPCCSystems
RUN mkdir /var/log/HPCCSystems && chown hpcc:hpcc /var/log/HPCCSystems
RUN mkdir /var/lock/HPCCSystems && chown hpcc:hpcc /var/lock/HPCCSystems
RUN mkdir /var/run/HPCCSystems && chown hpcc:hpcc /var/run/HPCCSystems

ARG PKG_FILE=hpccsystems-platform-community_9.2.4-1jammy_amd64_k8s.deb
COPY ./${PKG_FILE} /tmp/${PKG_FILE}
RUN dpkg -i /tmp/${PKG_FILE} && \
apt-get install -f && \
rm /tmp/${PKG_FILE}

USER hpcc
ENV PATH="/opt/HPCCSystems/bin:${PATH}"
ENV HPCC_containerized=1
WORKDIR /var/lib/HPCCSystems
7 changes: 7 additions & 0 deletions docs/BuildTools/PortalGen.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,11 @@
<BR/>
</xsl:template>

<!-- Colourize ECL Code -->
<xsl:template name="user.head.content">
</xsl:template>
<xsl:template name="user.footer.content">
<script src="index.js" />
</xsl:template>

</xsl:stylesheet>
1 change: 1 addition & 0 deletions docs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ endif()


# Required directories to add.
add_subdirectory(portal-js)
add_subdirectory(common)
add_subdirectory(BuildTools)
add_subdirectory(resources)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@

<para>Example:</para>

<programlisting>EXPORT NeedC(INTEGER len) := TYPE
<programlisting lang="ECL">EXPORT NeedC(INTEGER len) := TYPE
EXPORT STRING LOAD(STRING S) := 'C' + S[1..len];
EXPORT STRING STORE(STRING S) := S[2..len+1];
EXPORT INTEGER PHYSICALLENGTH(STRING S) := len;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@
<para>Alien data types (TYPE) should only be used when accessing external
data files. It is much more efficient to use the native types for general
processing. In particular, some optimizations to project and filter files
remotely are not supported on alien datatypes. </para>
remotely are not supported on alien datatypes.</para>

<para>A TYPE structure may only contain function definitions from the the
list of available Special Functions (see <emphasis role="bold">TYPE
Structure Special Functions</emphasis>).</para>

<para>Example:</para>

<programlisting>STRING4 Rev(STRING4 S) := S[4] + S[3] + S[2] + S[1];
<programlisting lang="ECL">STRING4 Rev(STRING4 S) := S[4] + S[3] + S[2] + S[1];
EXPORT ReverseString4 := TYPE
EXPORT STRING4 LOAD(STRING4 S) := Rev(S);
EXPORT STRING4 STORE(STRING4 S) := Rev(S);
Expand Down
4 changes: 3 additions & 1 deletion docs/EN_US/ECLLanguageReference/ECLR_mods/BltInFunc-ABS.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@

<para>Example:</para>

<programlisting>AbsVal1 := ABS(1); // returns 1
<programlisting lang="ECL" role="runnable">AbsVal1 := ABS(1); // returns 1
AbsVal2 := ABS(-1); // returns 1
OUTPUT(AbsVal1);
OUTPUT(AbsVal2);
</programlisting>
</sect1>
Loading

0 comments on commit b0fa567

Please sign in to comment.