PEARL Procedures rev-distro-3.1.0-0-gea838b3-dirty
Igor procedures for the analysis of PEARL data
Loading...
Searching...
No Matches
pearl-compat.ipf
Go to the documentation of this file.
1#pragma TextEncoding = "UTF-8"
2#pragma rtGlobals=3 // Use modern global access method and strict wave access.
3#pragma IgorVersion = 6.1
4#pragma ModuleName = PearlCompat
5#pragma version = 1.01
6
7// copyright (c) 2019 Paul Scherrer Institut
8//
9// Licensed under the Apache License, Version 2.0 (the "License");
10// you may not use this file except in compliance with the License.
11// You may obtain a copy of the License at
12// http:///www.apache.org/licenses/LICENSE-2.0
13
26
31
32
33// Compatible CleanupName function
34//
35// Igor 8's CleanupName may return long object names (> 31 characters).
36// This breaks compatibility with earlier Igor versions.
37// Experiments that include waves, folders, windows etc. with long names
38// cannot be loaded with an earlier version.
39//
40// This is a drop-in replacement function for CleanupName.
41// In addition to the behaviour of CleanupName,
42// this replacement ensures that names are limited to 31 characters.
43//
44// @param name object name to clean up
45//
46// @return (str) clean object name
47//
48function /s PearlCleanupName(name)
49 string name
50
51#if IgorVersion() >= 8.00
52 // note: this function is not threadsafe
53 return CleanupName(name, 0, 31)
54#else
55 return CleanupName(name, 0)
56#endif
57
58end
string PearlCleanupName(string name)