hello all, got the following error as soon as trying to compile my program. "subscripted value is neither variety nor pointer" Here"s the code... const rise roundOff<> = 0.0, .05, .005, .0005, .00005, .000005, .0000005, .00000005, .000000005; if(roundOff) if((digitsPastDecimal > 0) && (digitsPastDecimal valueUnion.float_variable = valueUnion.float_variable + roundOff; The last line is the line the throws the error.Looks like variety to me. Any kind of ideas? Thanks.


You are watching: Subscripted value is not an array



*

It seems to think roundOff is not an array. Possibly you"ve gained "roundOff" accidentally characterized elsewhere in your program? It"ll assist if you write-up your whole program here. Or at the very least a smaller version the your regimen that exhibits the same symptom. Also, why "if(roundOff)"? seems odd to usage a tip like that.


OMG, carry out I feel stupid. Friend are specifically right. RoundOff is declared as an integer that is passed right into this subroutine. It"s a flag used to determine if the routine have to round off the worth or not. I referred to as the array bythe exact same name. Just how stupid that me... But then, i knew it had to be stupid. It nearly always is. Sometimes you simply look and look and also can"t check out what is staring friend in the face. Many thanks for the input.


See more: 6 Oz Baked Chicken Breast Calories, Chicken Breast (Skin Not Eaten)

*
Jump to: run to- - - - - - - - - - - - - - MPLAB Xpress- - - - MPLAB X IPE- - - - MPLAB ICD4 Debugger- - - - MPLAB PICkit 4 Debugger- - - - MPLAB Snap- - - - MPLAB® code Configurator - - - - MPLAB real ICE- - - - MPLAB ICD In Circuit Debuggers- - - - MPLAB Harmony- - - - MPLAB Simulator- - - - MPLAB 8 IDE- - - - MPASM, MPLINK, MPLIB (assembler, linker, librarian)- - - - MPLAB XC8- - - - HI-TECH C Compilers- - - - MPLAB C18 Compiler- - - - MPLAB XC16- - - - MPLAB C30 Compiler, ASM30, Link30 forum- - - - MPLAB XC32- - - - MPLAB C32 Compiler- - - - Visual maker Initializer- - - - Evaluation and also Demonstration Boards- - - - Programmers (MPLAB PM3, PICSTART Plus, PICkit 2, PICkit 3)- - - - Emulators (MPLAB ice cream 2000, MPLAB ice cream 4000)- - - - Microstick advance Board because that dsPIC33F & PIC24H- - - - Linux, Open source Projects and Other Topics- - - - MATLAB- - - - CML- - - - Tips and Tricks- - - - Other development Tool Topics- - - - Arriba concept for PIC MCUs- - - - Curiosity- - - - motorBench™ advancement Suite- - - - UNI/O™ Serial EEPROM- - - - Serial EEPROMS - I²C- - - - Serial EEPROMS - Microwire- - - - Serial EEPROMS - SPI- - - - Serial SRAM- - - - MAC attend to Chips- - - - Serial EPROM- - - - Parallel EPROM- - - - Parallel EEPROM- - - - i would Solutions and Plug N pat Products- - - - Serial Flash- - - - Parallel Flash- - - - smart Card- - - - RFID- - - - Literature- - - - MCP2510 Stand-alone can Controller - - - - other Issues<8-Bit Microcontrollers>- - - - PIC Microcontrollers (PIC10F, PIC12F, PIC16F, PIC18F)- - - - heritage PIC Microcontrollers (PIC14000, PIC17, PICxxC)- - - - Peripherals / main point Independent Peripherals- - - - - - - - Analog (ADC, Comp, DAC, HC I/O, OPA, PRG, SlopeComp, ZCD)- - - - - - - - Waveform regulate (CCP/ECCP, PWM, PSMC, COG, CWG, NCO, DSM)- - - - - - - - Timing and also Measurements (AngTMR, HLT, PSMC, PWM, NCO, SMT, RTCC, TEMP)- - - - - - - - communications (EUSART/AUSART, I2C/SPI, USB, CAN, LIN, KeeLoq)- - - - - - - - User user interface (mTouch, HCVD, LCD)- - - - - - - - logic / security & surveillance / Low strength (CLC, MULT, MathACC, CRC/SCAN, HLT, WWDT, HEF, PPS, IDLE, DO- - - - Documentation (Programming Specifications, Errata, Literature)- - - - advice & tip Solutions overview & various other PIC Topics<16 bit Microcontrollers & Digital Signal controllers>- - - - dsPIC30F Topics- - - - Programming Specifications- - - - dsPIC33F Topics- - - - PIC24 Topics- - - - - - - - Graphics<32-Bit Microcontrollers>- - - - general PIC32 Topics- - - - PIC32 Beta Release software program (not supported)- - - - FAQs- - - - basic MPU Topics- - - - Linux for MPUs- - - - software program Tools for MPUs- - - - Kits and also Boards for MPUs- - - - Ensemble graphic Toolkit- - - - Welcome- - - - MCP250xx devices- - - - Serial Real-Time Clocks (RTCC’s)- - - - Clock Solutions- - - - FPGA devices- - - - FPGA design and also debug tools- - - - - - - - FPGA style Tools- - - - - - - - SoC architecture Tools- - - - - - - - SmartHLS Tool- - - - - - - - Vectorblox AI- - - - - - - - Programming and Debug- - - - FPGA IP cores- - - - General- - - - gaining Started v Keeloq- - - - PPP/SLIP- - - - Ethernet- - - - Gateway- - - - TCP/IP stack v6 Beta- - - - tutorial Questions- - - - centregalilee.com Registered Consultants Forum- - - - Main- - - - Buy, market or Trade- - - - - - - - - - - - Firmware Questions- - - - - - - - Hardware Questions- - - - - - - - App advance Questions- - - - WiFi- - - - Bluetooth short Energy- - - - MiWi- - - - LoRa®- - - - 802.15.4- - - - below GHz- - - - Bluetooth Audio- - - - Voice and also Audio- - - - remote Control- - - - other Wireless- - - - Welcome- - - - acquiring Started- - - - Upcoming changes- - - - Forum FAQs- - - - Forum Support<日本語フォーラム>- - - - 開発ツール- - - - - - - - MPLAB IDE- - - - - - - - MPLAB actual ICE- - - - - - - - MPLAB ICD2- - - - - - - - MPLAB シミュレータ- - - - - - - - MPLAB C18 コンパイラ- - - - - - - - MPLAB C30 コンパイラ、ASM30、Link30- - - - - - - - 評価/デモ/開発 ボード- - - - - - - - エミュレータ(ICE2000、ICE4000)- - - - - - - - プログラマ(MPLAB PM3、PICSTART Plus、PICkit 2、ICSPなど)- - - - 8ビット PIC マイコン- - - - - - - - コア (命令、リセット、WDT、仕様、・・・)- - - - - - - - 周辺機能 (ADC、PWM、タイマ、UART、・・・)- - - - 16ビット PIC マイコン & DSC- - - - - - - - コア (命令、リセット、WDT、仕様、・・・)- - - - - - - - 周辺機能 (ADC、PWM、タイマ、UART、DMA・・・)- - - - - - - - DSP命令、機能- - - - メモリ製品- - - - - - - - I2C (24xxxx)- - - - - - - - SPI (25xxxx)- - - - - - - - MicroWire (93xxxx)- - - - アナログ & インターフェース製品<中文论坛>- - - - 8位单片机产品- - - - 16位单片机及DSC产品- - - - 模拟及存储产品- - - - 开发工具- - - - C语言及RTOS- - - - 单片机应用技术- - - - centregalilee.com Jobs- - - - online Shopping- - - - COM2109 - advent to I2C- - - - COM3101 - advent to complete Speed USB- - - - COM3201 - designing a custom USB Peripheral Application- - - - COM3202 - designing a USB embedded Host Application- - - - COM4101 - advent to installed Ethernet- - - - COM4301 - making Embedded TCP/IP Monitor and also Control- - - - COM4302 - advanced TCP/IP HTTP Applications- - - - COM5610 - quick LIN architecture Using a Pre-Certified Configurator- - - - DSP0101 - arrival to DSP Concepts- - - - DSP0201 - utilizing DSP features of the dsPIC® DSC Architecture- - - - DSP0202 - making with centregalilee.com's DSP Libraries and also Tools- - - - HIF2131 - developing with centregalilee.com’s graphic Library- - - - IRF2101 - adding IEEE 802.11/Wi-Fi® come An installed Application- - - - IRF2102 - Wireless Networking through the MiWi™ development Environment- - - - MCT0101 - rundown of clever Motor control Solutions- - - - MCT3101 - BLDC manage Techniques- - - - MCT4201 - AC Induction Motor regulate using dsPICDEM MCHV breakthrough board- - - - MCT7101 - Sensorless field Oriented manage for PMSM Motors- - - - MCU0101 - getting Started v Baseline PIC® MCU Architecture, Instruction set and Peripheral Progra- - - - MCU1121 - Mid-Range Microcontroller family members Peripheral Configuration and also Usage making use of the HI-TECH® C C- - - - MCU2101 - obtaining Started with PIC18 Architecture and also Instruction Set- - - - MCU2121 - PIC18 Microcontroller family members Peripheral Configuration and Usage using the C18 C Compiler- - - - MCU3101 - acquiring Started v centregalilee.com's 16-bit MCU Architecture and Instruction Set- - - - MCU3121 - centregalilee.com 16-bit MCU Peripherals (Unit 1)- - - - MCU3122 - centregalilee.com 16-bit MCU Peripherals (Unit 2)- - - - MCU4101 - advent to centregalilee.com's PIC32 MCU- - - - PWR3101 - Digital strength Converter Basics using dsPIC33 Digital Signal Controllers (DSC)- - - - PWR3201 - Implementation of Digital regulate Techniques for strength Converters utilizing dsPIC® SMPS Family- - - - TLS0000 - obtaining Started v centregalilee.com Live Online- - - - TLS0101 - gaining Started through centregalilee.com breakthrough Tools- - - - TLS0999 - Transitioning come MPLAB X from MPLAB 8- - - - TLS2101 - arrival to the C Programming Language for embedded Engineers- - - - TLS2130 - acquiring Started v MPLAB® C because that dsPIC DSCs and also PIC24 MCUs- - - - XLP0101 - Low strength System style with nanoWatt XLP- - - - XLP1101 - Battery selection for short Power embedded Solutions